-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
232 lines (202 loc) · 10.3 KB
/
index.html
File metadata and controls
232 lines (202 loc) · 10.3 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
<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MOUSE AI | GLOBAL IPTV SYSTEM</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@700&family=Tajawal:wght@400;700&display=swap" rel="stylesheet">
<style>
:root {
--primary: #00d2ff;
--accent: #00ff88;
--bg-dark: #02040a;
--panel-bg: #0d1117;
--text: #e6edf3;
}
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Tajawal', sans-serif; }
body { background: var(--bg-dark); color: var(--text); height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
/* Navigation */
nav {
height: 70px; background: #000; border-bottom: 2px solid var(--primary);
display: flex; align-items: center; justify-content: space-between;
padding: 0 40px; box-shadow: 0 0 20px rgba(0, 210, 255, 0.2); z-index: 10;
}
.brand { font-family: 'Orbitron'; font-size: 1.8rem; color: var(--primary); letter-spacing: 2px; }
.status-tag { background: rgba(0, 255, 136, 0.1); color: var(--accent); padding: 5px 15px; border-radius: 20px; font-size: 0.8rem; font-weight: bold; }
.main-wrapper { display: flex; flex: 1; width: 100%; overflow: hidden; }
/* Sidebar */
.sidebar { width: 420px; background: var(--panel-bg); border-left: 1px solid #30363d; display: flex; flex-direction: column; }
.control-panel { padding: 20px; background: #161b22; border-bottom: 1px solid #333; }
.input-box { width: 100%; padding: 12px; background: #000; border: 1px solid #333; color: white; border-radius: 8px; margin-bottom: 10px; outline: none; }
.btn-action {
width: 100%; padding: 12px; background: var(--primary); border: none; border-radius: 8px;
font-weight: bold; cursor: pointer; color: #000; transition: 0.3s; margin-bottom: 5px;
}
.btn-action:hover { background: var(--accent); box-shadow: 0 0 15px var(--accent); }
.search-area { padding: 15px; border-bottom: 1px solid #333; }
.channel-list { flex: 1; overflow-y: auto; padding: 15px; display: flex; flex-direction: column; gap: 8px; }
.channel-item {
display: flex; align-items: center; padding: 12px; background: #161b22; border-radius: 10px;
cursor: pointer; border: 1px solid transparent; transition: 0.2s;
}
.channel-item:hover { border-color: var(--primary); background: #1c2128; transform: translateX(-5px); }
.channel-item img { width: 45px; height: 45px; border-radius: 5px; margin-left: 15px; object-fit: contain; background: #000; }
.channel-item .info b { font-size: 0.95rem; color: #fff; display: block; }
.channel-item .info small { font-size: 0.75rem; color: var(--primary); }
/* Player */
.content-area { flex: 1; padding: 25px; background: #05070a; display: flex; flex-direction: column; }
.video-box { flex: 1; background: #000; border-radius: 20px; overflow: hidden; border: 1px solid #30363d; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
video { width: 100%; height: 100%; }
.now-playing {
margin-top: 15px; padding: 20px; background: var(--panel-bg); border-radius: 15px;
display: flex; justify-content: space-between; align-items: center;
}
/* Footer */
footer {
height: 45px; background: #000; border-top: 1px solid #333;
display: flex; align-items: center; justify-content: center;
font-size: 0.85rem; color: #8b949e;
}
footer b { color: var(--primary); margin: 0 5px; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }
</style>
</head>
<body>
<nav>
<div class="brand">MOUSE AI <span style="font-size: 0.7rem; opacity: 0.5;">GLOBAL</span></div>
<div class="status-tag" id="loadStatus">جاري فحص المصدر...</div>
</nav>
<div class="main-wrapper">
<aside class="sidebar">
<div class="control-panel">
<p style="font-size: 0.8rem; margin-bottom: 10px; color: var(--primary);">تحديث المصدر العالمي:</p>
<button class="btn-action" onclick="fetchGlobalList()"><i class="fas fa-sync-alt"></i> تحديث القنوات العالمية</button>
<p style="font-size: 0.7rem; color: #666; margin-top: 5px;">يتم التحديث من: iptv-org</p>
</div>
<div class="search-area">
<input type="text" id="searchInput" class="input-box" placeholder="ابحث عن قناة في القائمة..." onkeyup="filterChannels()">
<select id="groupFilter" class="input-box" onchange="filterChannels()">
<option value="all">جميع الدول والتصنيفات</option>
</select>
</div>
<div class="channel-list" id="listContainer">
</div>
</aside>
<main class="content-area">
<div class="video-box">
<video id="player" controls autoplay poster="https://wallpaperaccess.com/full/1567831.jpg"></video>
</div>
<div class="now-playing">
<div>
<h2 id="viewName" style="color: var(--primary);">اختر قناة للبدء</h2>
<p id="viewGroup" style="color: var(--accent); font-size: 0.9rem;">نظام مِستر إيه آي المتطور</p>
</div>
<div id="totalCount" style="color: #8b949e; font-size: 0.8rem;">0 قناة</div>
</div>
</main>
</div>
<footer>
تم التطوير بواسطة <b>MUSTAPHA (MisterAI)</b> | جميع الحقوق محفوظة © 2025
</footer>
<script>
const GLOBAL_URL = "https://raw.githubusercontent.com/ijrambux/MOUSEAIiptvm3u/refs/heads/main/index.m3u";
let allChannels = [];
const video = document.getElementById('player');
const hls = new Hls();
window.onload = () => {
const saved = localStorage.getItem('MisterAI_Global_Data');
if (saved) {
allChannels = JSON.parse(saved);
refreshUI();
document.getElementById('loadStatus').textContent = "متصل - ذاكرة محلية";
} else {
fetchGlobalList();
}
};
async function fetchGlobalList() {
document.getElementById('loadStatus').textContent = "جاري التحميل...";
try {
const response = await fetch(GLOBAL_URL);
const data = await response.text();
parseChannels(data);
document.getElementById('loadStatus').textContent = "تم التحديث بنجاح";
} catch (err) {
document.getElementById('loadStatus').textContent = "فشل التحديث - جرب لاحقاً";
alert("حدث خطأ أثناء جلب القنوات العالمية.");
}
}
function parseChannels(data) {
const lines = data.split('\n');
allChannels = [];
for (let i = 0; i < lines.length; i++) {
if (lines[i].includes('#EXTINF:')) {
const name = lines[i].split(',')[1]?.trim() || "Unknown";
const group = lines[i].match(/group-title="([^"]+)"/)?.[1] || "Global";
const logo = lines[i].match(/tvg-logo="([^"]+)"/)?.[1] || "";
const url = lines[i+1]?.trim();
if (url && url.startsWith('http')) {
allChannels.push({ name, group, logo, url });
}
}
}
localStorage.setItem('MisterAI_Global_Data', JSON.stringify(allChannels));
refreshUI();
}
function refreshUI() {
updateGroups();
renderList(allChannels);
document.getElementById('totalCount').textContent = `${allChannels.length} قناة متوفرة`;
}
function updateGroups() {
const select = document.getElementById('groupFilter');
const groups = [...new Set(allChannels.map(c => c.group))];
select.innerHTML = '<option value="all">جميع الدول والتصنيفات</option>';
groups.sort().forEach(g => {
select.innerHTML += `<option value="${g}">${g}</option>`;
});
}
function renderList(data) {
const container = document.getElementById('listContainer');
container.innerHTML = '';
data.slice(0, 500).forEach(c => { // عرض أول 500 قناة للأداء السلس
const item = document.createElement('div');
item.className = 'channel-item';
item.innerHTML = `
<img src="${c.logo}" onerror="this.src='https://cdn-icons-png.flaticon.com/512/716/716429.png'">
<div class="info">
<b>${c.name}</b>
<small>${c.group}</small>
</div>
`;
item.onclick = () => play(c);
container.appendChild(item);
});
}
function filterChannels() {
const query = document.getElementById('searchInput').value.toLowerCase();
const group = document.getElementById('groupFilter').value;
const filtered = allChannels.filter(c =>
(group === 'all' || c.group === group) && c.name.toLowerCase().includes(query)
);
renderList(filtered);
}
function play(c) {
document.getElementById('viewName').textContent = c.name;
document.getElementById('viewGroup').textContent = c.group;
if (Hls.isSupported()) {
hls.destroy();
const newHls = new Hls();
newHls.loadSource(c.url);
newHls.attachMedia(video);
newHls.on(Hls.Events.MANIFEST_PARSED, () => video.play());
} else {
video.src = c.url;
video.play();
}
}
</script>
</body>
</html>