|
player = new Clappr.Player({ |
|
source: "https://sportnext.online/hls/M1.m3u8", |
|
type: "application/x-mpegURL", |
|
mute:false, |
|
height: 290, |
|
width: "90%", |
|
autostart: false, |
|
poster: 'https://i.imgur.com/T4i6UFD.jpg', |
|
parentId: "#clappr", |
|
}); |
|
|
|
function castChannel(channelNumber) { |
|
|
|
|
|
if (player) { |
|
player.destroy(); |
|
} |
|
|
|
|
|
player = new Clappr.Player({ |
|
source: "", |
|
type: "application/x-mpegURL", |
|
mute: false, |
|
height: 290, |
|
width: "90%", |
|
autostart: false, |
|
poster: 'https://i.imgur.com/T4i6UFD.jpg', |
|
parentId: "#clappr", |
|
}); |
|
|
|
|
|
const videoSources = { |
|
0: "https://sportnext.online/hls/M1.m3u8", |
|
1: "https://sportnext.online/hls/M2.m3u8", |
|
2: "https://sportnext.online/hls/M3.m3u8", |
|
3: "https://sportnext.online/hls/M4.m3u8", |
|
4: "https://sportnext.online/hls/M5.m3u8", |
|
5: "https://nflarcadia.xyz/bRtT37sn3w/Sx5q6YTgCs/1.m3u8", |
|
6: "https://nflarcadia.xyz/bRtT37sn3w/Sx5q6YTgCs/2.m3u8", |
|
7: "https://nflarcadia.xyz/bRtT37sn3w/Sx5q6YTgCs/3.m3u8", |
|
8: "https://nflarcadia.xyz/bRtT37sn3w/Sx5q6YTgCs/4.m3u8", |
|
9: "https://nflarcadia.xyz/bRtT37sn3w/Sx5q6YTgCs/5.m3u8", |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
if (videoSources.hasOwnProperty(channelNumber)) { |
|
|
|
player.load(videoSources[channelNumber]); |
|
|
|
} else { |
|
console.error("Channel not found"); |
|
} |
|
} |
|
|
|
document.addEventListener('contextmenu', (e) => e.preventDefault()); |
|
|
|
function ctrlShiftKey(e, keyCode) { |
|
return e.ctrlKey && e.shiftKey && e.keyCode === keyCode.charCodeAt(0); |
|
} |
|
|
|
document.onkeydown = (e) => { |
|
|
|
if ( |
|
event.keyCode === 123 || |
|
ctrlShiftKey(e, 'I') || |
|
ctrlShiftKey(e, 'J') || |
|
ctrlShiftKey(e, 'C') || |
|
(e.ctrlKey && e.keyCode === 'U'.charCodeAt(0)) |
|
) |
|
return false; |
|
}; |
|
|