-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
345 lines (312 loc) Β· 19.5 KB
/
Copy pathindex.html
File metadata and controls
345 lines (312 loc) Β· 19.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
<!doctype html>
<html lang="uz">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Premium IPTV Player</title>
<link rel="manifest" href="manifest.json">
<meta name="theme-color" content="#6366f1">
<!-- Google Fonts: Outfit -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
<!-- HLS.js CDN -->
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<!-- Dash.js CDN -->
<script src="https://cdn.dashjs.org/latest/dash.all.min.js"></script>
</head>
<body>
<div class="app-background">
<div class="glow glow-1"></div>
<div class="glow glow-2"></div>
<div class="glow glow-3"></div>
</div>
<div class="app-container">
<div id="sidebarOverlay" class="sidebar-overlay"></div>
<!-- Sidebar -->
<aside class="sidebar">
<div class="sidebar-header">
<div class="logo">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="7" width="20" height="15" rx="2" ry="2"></rect><polyline points="17 2 12 7 7 2"></polyline></svg>
IPTV Player
</div>
<button id="settingsBtn" class="control-btn" title="Sozlamalar">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg>
</button>
</div>
<div class="search-container" style="display: flex; gap: 0.5rem;">
<input type="text" id="searchInput" class="search-input" placeholder="Qidiruv..." style="flex: 1;" autocomplete="off">
<button id="filterToggleBtn" class="control-btn" title="Kengaytirilgan filtrlar">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon></svg>
</button>
</div>
<div id="advancedFilterPanel" class="advanced-filter-panel hidden">
<select id="countryFilter" class="filter-select">
<option value="">Davlatlar (Barchasi)</option>
</select>
<select id="languageFilter" class="filter-select">
<option value="">Tillar (Barchasi)</option>
</select>
<select id="categoryFilter" class="filter-select">
<option value="">Janrlar (Barchasi)</option>
</select>
<button id="clearFiltersBtn" class="clear-filters-btn">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
Filtrlarni tozalash
</button>
</div>
<div class="tabs-header">
<div class="tabs">
<button class="tab-btn active" data-tab="all">Barchasi <span class="tab-count" id="count-all">0</span></button>
<button class="tab-btn" data-tab="fav">Sevimlilar <span class="tab-count" id="count-fav">0</span></button>
<button class="tab-btn" data-tab="recent">Tarix <span class="tab-count" id="count-recent">0</span></button>
</div>
</div>
<div class="channel-list-container">
<div class="channel-list-phantom"></div>
<div class="channel-list-content">
<!-- Channels will be injected here via JS -->
</div>
</div>
<div id="alphabetIndicator" class="alphabet-indicator"></div>
</aside>
<!-- Resizer Handle -->
<div class="sidebar-resizer" title="Kengaytirish/Qisqartirish"></div>
<!-- Main Content -->
<main class="main-content">
<button id="mobileMenuBtn" class="mobile-menu-btn fixed-toggle-btn" title="Menyuni ochish/yopish">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg>
</button>
<div class="video-container">
<!-- Custom Channel Context Menu -->
<div id="contextMenu" class="context-menu hidden">
<ul>
<li id="menuPlay">βΆοΈ Hozir ko'rish</li>
<li id="menuNewTab">πͺ Yangi oynada ochish</li>
<li id="menuFav">β€οΈ Sevimlilarga qo'shish</li>
<li id="menuCopy">π Havolani nusxalash</li>
<li id="menuInfo">βΉοΈ Kanal haqida</li>
</ul>
</div>
<video id="mainVideo" playsinline webkit-playsinline></video>
<div class="loader"></div>
<div id="tvStaticOverlay" class="tv-static-overlay"></div>
<div id="errorDisplay" class="error-display" style="display: none;">
<div id="errorIcon" class="error-icon">
<svg width="64" height="64" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="7" width="20" height="15" rx="2" ry="2"></rect><polyline points="17 2 12 7 7 2"></polyline><line x1="8" y1="12" x2="16" y2="16"></line><line x1="8" y1="16" x2="16" y2="12"></line></svg>
</div>
<div class="error-text">Stream Unavailable</div>
<div class="error-desc" style="color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.5rem; max-width: 300px; line-height: 1.4;">Kanal bilan ulanish o'rnatilmadi.</div>
<button id="retryBtn" class="primary-btn">Qayta urinish (Retry)</button>
</div>
<!-- Mini Channel List (Pop-up from bottom) -->
<div id="miniChannelList" class="mini-channel-list hidden">
<div class="mini-list-header">
<div class="mini-tabs">
<button class="mini-tab-btn active" data-mini-tab="fav">β€οΈ Sevimlilar</button>
<button class="mini-tab-btn" data-mini-tab="recent">π Tarix</button>
</div>
<button id="closeMiniBtn" class="close-mini-btn">Γ</button>
</div>
<div class="mini-list-content grid"></div>
</div>
<!-- Volume OSD Overlay -->
<div id="volumeOSD" class="volume-osd hidden">Ovoz: 100%</div>
<!-- Sleep Timer Selection Dialog -->
<div id="sleepTimerDialog" class="sleep-timer-dialog hidden">
<div class="sleep-dialog-header">Vaqtni tanlang</div>
<div class="sleep-options">
<button class="sleep-opt-btn" data-mins="5">5 m</button>
<button class="sleep-opt-btn" data-mins="15">15 m</button>
<button class="sleep-opt-btn" data-mins="30">30 m</button>
<button class="sleep-opt-btn" data-mins="60">1 soat</button>
<button class="sleep-opt-btn" data-mins="120">2 soat</button>
</div>
<button id="closeSleepDialog" class="sleep-cancel-btn">Bekor qilish</button>
</div>
<!-- Player Context Menu (Moved here for Fullscreen visibility) -->
<div id="playerContextMenu" class="context-menu hidden">
<ul>
<li id="pMenuPlayPause">βΈ Pauza</li>
<li id="pMenuMute">π Ovozni o'chirish</li>
<li id="pMenuRecord">π΄ Yozib olishni boshlash</li>
<div class="context-menu-divider"></div>
<li id="pMenuSleep">β³ Uyqu taymeri (Sleep)</li>
<li id="pMenuTheater">π Kino rejimi (Theater)</li>
<li id="pMenuMiniList">πΊ Kanallar ro'yxati (Mini)</li>
</ul>
</div>
<!-- Custom Controls -->
<div class="controls-overlay">
<!-- Sleep Timer Indicator -->
<div id="sleepIndicator" class="sleep-indicator hidden">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg>
<span id="sleepTimerText">00:00</span>
</div>
<!-- Recording Indicator -->
<div id="recOverlay" class="rec-overlay hidden">
<div class="rec-dot"></div>
<span id="recTimer">00:00</span>
</div>
<div id="channelNameDisplay" style="color: white; font-size: 1.2rem; font-weight: 600; margin-bottom: 0.5rem; text-shadow: 0 1px 2px rgba(0,0,0,0.5);">
Kanal tanlanmagan
</div>
<div class="controls-row">
<div class="controls-left">
<button id="playBtn" class="control-btn">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="5 3 19 12 5 21 5 3"></polygon></svg>
</button>
<div class="volume-wrapper">
<div class="controls-left">
<button id="volumeBtn" class="control-btn">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>
</button>
<div class="volume-container">
<input type="range" id="volumeSlider" class="volume-slider" min="0" max="1" step="0.1" value="1">
</div>
</div>
</div>
</div>
<div class="controls-right">
<!-- Quality Selector placeholder -->
<!-- <div class="quality-selector">
<button class="control-btn">HD</button>
</div> -->
<!-- Record Pause Button (only visible while recording) -->
<button id="recPauseBtn" class="control-btn rec-pause-btn" title="Yozishni to'xtatish / Pause Record" style="display:none;">
<svg id="recPauseIcon" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="6" y="4" width="4" height="16"></rect><rect x="14" y="4" width="4" height="16"></rect></svg>
</button>
<!-- Record Button -->
<button id="recordBtn" class="control-btn" title="Yozib olish / Record">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="6" fill="currentColor"></circle></svg>
</button>
<!-- Theater Mode Button -->
<button id="theaterBtn" class="control-btn" title="Kino rejimi (T)">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="4" width="20" height="16" rx="2"></rect><line x1="2" y1="15" x2="22" y2="15"></line></svg>
</button>
<button id="pipBtn" class="control-btn" title="Picture in Picture">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="10" width="10" height="7" rx="1"></rect><rect x="2" y="4" width="20" height="16" rx="2"></rect></svg>
</button>
<button id="fullscreenBtn" class="control-btn" title="To'liq ekran">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"></path></svg>
</button>
</div>
</div>
</div>
</div>
</main>
</div>
<!-- Settings Modal -->
<div id="settingsModal" class="modal">
<div class="modal-content">
<div class="modal-header">
<div class="modal-title">Sozlamalar</div>
<button id="closeModalBtn" class="control-btn" style="color: var(--text-color)">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
</button>
</div>
<div class="input-group">
<label class="input-label">M3U Playlist URL</label>
<input type="text" id="m3uInput" class="url-input" placeholder="https://example.com/playlist.m3u">
<small style="color: var(--text-muted); display: block; margin-top: 0.5rem;">
Sinov uchun: https://iptv-org.github.io/iptv/index.m3u
</small>
<div style="margin-top: 1rem; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1rem;">
<button id="loadApiBtn" class="primary-btn" style="width: 100%; background: linear-gradient(135deg, #6366f1, #a855f7); display: flex; align-items: center; justify-content: center; gap: 8px;">
π Global Discovery (JSON API)
</button>
<p style="font-size: 0.75rem; color: var(--text-muted); margin-top: 0.5rem; text-align: center;">
iptv-org ochiq bazasidan minglab sifatli kanallarni yuklash.
</p>
</div>
</div>
<div class="input-group">
<label class="input-label">Mavzu (Theme)</label>
<div class="theme-options">
<button class="theme-btn active" data-theme="dark">Qorong'u</button>
<button class="theme-btn" data-theme="light">Yorug'</button>
<button class="theme-btn" data-theme="glass">Shisha</button>
</div>
</div>
<!-- Divider -->
<div class="settings-divider">
<span>Sevimlilar</span>
</div>
<!-- Favorites Import/Export -->
<div class="fav-io-section">
<div class="fav-io-info">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>
<span id="favCountLabel">Sevimlilar: 0 ta kanal</span>
</div>
<div class="fav-io-buttons">
<button id="exportFavBtn" class="fav-io-btn fav-export-btn" title="Sevimlilarni JSON fayl sifatida yuklab olish">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>
Export (JSON)
</button>
<label class="fav-io-btn fav-import-btn" for="importFavFile" title="JSON fayldan sevimlilarni import qilish">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line></svg>
Import
<input type="file" id="importFavFile" accept=".json" style="display:none;">
</label>
<button id="clearFavBtn" class="fav-io-btn fav-clear-btn" title="Barcha sevimlilarni o'chirish">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"></path><path d="M10 11v6"></path><path d="M14 11v6"></path></svg>
Tozalash
</button>
</div>
</div>
<button id="saveSettingsBtn" class="primary-btn">Saqlash</button>
</div>
</div>
<!-- Channel Info Modal (Premium) -->
<div id="channelInfoModal" class="modal">
<div class="modal-content channel-info-card">
<div class="modal-header">
<div class="modal-title">π₯ Kanal ma'lumotlari</div>
<button id="closeInfoModalBtn" class="control-btn" style="color: var(--text-color)">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
</button>
</div>
<div class="channel-info-body">
<div class="ch-info-top">
<img id="infoLogo" src="" alt="" class="info-logo">
<div class="ch-meta">
<h2 id="infoName">Kanal nomi</h2>
<span id="infoGroup" class="info-tag">Guruh</span>
</div>
</div>
<div class="ch-details-grid">
<div class="detail-item">
<label>π Mamlakat</label>
<span id="infoCountry">-</span>
</div>
<div class="detail-item">
<label>π£ Til</label>
<span id="infoLanguage">-</span>
</div>
<div class="detail-item">
<label>π Havola (URL)</label>
<div class="url-copy-box">
<code id="infoUrl">https://...</code>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Custom Context Menu -->
<div id="favToast" class="fav-toast hidden"></div>
<script src="storage.js"></script>
<script src="parser.js"></script>
<script src="stream.js"></script>
<script src="controls.js"></script>
<script src="app.js"></script>
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('sw.js')
.then(() => console.log('Service Worker Registered'))
.catch((err) => console.error('Service Worker Error:', err));
}
</script>
</body>
</html>