mirror of
https://github.com/LaQuay/TDTChannels.git
synced 2024-11-23 09:23:24 +01:00
37 lines
902 B
HTML
37 lines
902 B
HTML
|
<html>
|
||
|
<head>
|
||
|
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/clappr@latest/dist/clappr.min.js"></script>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="player"></div>
|
||
|
<script>
|
||
|
var getUrlParameter = function getUrlParameter(sParam) {
|
||
|
var sPageURL = decodeURIComponent(window.location.search.substring(1)),
|
||
|
sURLVariables = sPageURL.split('&'),
|
||
|
sParameterName,
|
||
|
i;
|
||
|
|
||
|
for (i = 0; i < sURLVariables.length; i++) {
|
||
|
sParameterName = sURLVariables[i].split('=');
|
||
|
|
||
|
if (sParameterName[0] === sParam) {
|
||
|
return sParameterName[1] === undefined ? true : sParameterName[1];
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
|
||
|
var channelToReproduce = getUrlParameter("channel");
|
||
|
|
||
|
if (channelToReproduce.includes("m3u8")) {
|
||
|
var player = new Clappr.Player({
|
||
|
source: channelToReproduce,
|
||
|
parentId: '#player',
|
||
|
height: '100%',
|
||
|
width: '100%',
|
||
|
autoPlay: true,
|
||
|
});
|
||
|
}
|
||
|
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|