Update index.html
Browse files58 unmodified lines596061626263646543 unmodified lines1091101111121131141151161171181191201211221231241171251261273 unmodified lines13113213312713413512913613713813914014113514214314421 unmodified lines1661671681631691701711724 unmodified lines1771781791741751801811821831841851861 unmodified line1881891901831911921934 unmodified lines1981992001942012022031 unmodified line2052062072082092102022112122132142152162172182192202212 unmodified lines22422522621122722822958 unmodified lines
<div class="header"> <h2>📺 IPTV World</h2> <p>قنوات عالمية — بث مباشر مع إعلانات تلقائية</p> <p>قنوات عالمية — بث مباشر مع إعلانات VAST</p> </div>
<div class="sources" id="sources">43 unmodified lines// رابط الـ VAST Tag الخاص بكconst VAST_URL = "https://unfolded-uncle.com/dgm-FfzOd.GrN/vhZKGIUr/qeHmE9DuhZ-UUl/kpPXTTc/1LNQDlcowINQTzMVtbNxz_U/0nNrzoAJ1nNwwd";
// قائمة قنوات احتياطية تضمن عمل التطبيق فوراً بدون توقفconst fallbackChannels = [ { name: "العربية الحدث (بث مباشر)", category: "أخبار", url: "https://live.alarabiya.net/alarabiya/aldashat.m3u8" }, { name: "الجزيرة الإخبارية", category: "أخبار", url: "https://live-hls-web-aje.getaj.net/AJE/03.m3u8" }, { name: "فرانس 24 عربي", category: "أخبار", url: "https://f24hls.live.cf.ww.aiv-cdn.net/hls/live/2016335/f24ar_hls/master.m3u8" }, { name: "سكاي نيوز عربية", category: "أخبار", url: "https://skynewsarabia.live.hls.adaptive.level3.net/skynewsarabia/index.m3u8" }];
function initFluidPlayer() { if (playerInstance) { playerInstance.destroy(); }
// تهيئة المشغل وإعداد إعلانات VAST بدون إمكانية التخطي playerInstance = fluidPlayer('main-video', { layoutControls: { fillToContainer: true,3 unmodified lines vastOptions: { adList: [ { roll: 'preRoll', // إعلان عند بدء الفيديو مباشرة roll: 'preRoll', vastTag: VAST_URL, allowSkip: false // إلغاء إمكانية تخطي الإعلان allowSkip: false } ] } });
// ضبط مؤقت لتكرار الإعلان كل 3 دقائق (180,000 مللي ثانية) if (adInterval) clearInterval(adInterval); adInterval = setInterval(() => { if (playerInstance) {21 unmodified lines
async function loadM3U(url){ const list=document.getElementById('channels-list'); list.innerHTML='<div class="status">جاري تحميل القنوات...</div>'; list.innerHTML='<div class="status">جاري جلب القنوات...</div>'; document.getElementById('count').textContent='تحميل...'; allChannels=[]; document.getElementById('category-select').innerHTML='<option value="all">كل الأقسام</option>';4 unmodified lines const data=await response.text(); parseM3U(data); }catch(e){ list.innerHTML='<div class="status">تعذر تحميل القنوات.</div>'; document.getElementById('count').textContent='خطأ في التحميل'; // في حال فشل الجلب الخارجي، تظهر القنوات الاحتياطية فوراً allChannels = fallbackChannels; updateCategories(allChannels); renderChannels(allChannels); }}
1 unmodified line const lines=content.split(/\r?\n/); const result=[]; let current=null; const cats=new Set();
for(const raw of lines){ const line=raw.trim();4 unmodified lines const name=comma>=0 ? line.slice(comma+1).trim() : 'قناة'; const group=(line.match(/group-title="([^"]*)"/i)||[])[1]||'عام'; current={name,category:group}; cats.add(group); }else if(current && !line.startsWith('#') && /^https?:\/\//i.test(line)){ current.url=line; result.push(current);1 unmodified line } }
if(result.length === 0){ allChannels = fallbackChannels; } else { allChannels=result; allChannels = result; } updateCategories(allChannels); renderChannels(allChannels);}
function updateCategories(channels) { const cats = new Set(channels.map(c => c.category)); const select=document.getElementById('category-select'); select.innerHTML='<option value="all">كل الأقسام</option>'; [...cats].sort().forEach(cat=>{2 unmodified lines option.textContent=cat; select.appendChild(option); }); renderChannels(allChannels);}
function applyFilters(){index.html+27-12