forked from jlord/gh-pages-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
172 lines (168 loc) · 10.1 KB
/
index.html
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
<!DOCTYPE html PUBLIC>
<html lang='en'>
<head>
<meta charset='utf-8'>
<title>Cast HLS/M3U8</title>
<meta name='description' content='Cast live streams / IPTV to your chromecast.'>
<meta name='viewport' content='height=device-height, initial-scale=1.0'>
<meta name='mobile-web-app-capable' content='yes'>
<meta name='application-name' content='Cast HLS/IPTV video streams'>
<meta name='theme-color' content='#000000'>
<meta name='apple-mobile-web-app-capable' content='yes'>
<meta name='apple-mobile-web-app-status-bar-style' content='black-translucent'>
<meta name='apple-mobile-web-app-title' content='Cast HLS/IPTV video streams'>
<link rel='shortcut icon' href='./static/img/castIcon_128.png'>
<link rel='icon' href='./static/img/castIcon_128.png' type='image/x-icon'>
<script src='https://www.gstatic.com/cv/js/sender/v1/cast_sender.js'></script>
<script src='./static/js/player.chromecast.dev.js'></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<style>
body {
background-image: url("orange.jpg");
background-color: #cccccc;
}
</style>
<style >
footer {
position: fixed;
width: 100%;
left: 0;
bottom: 0;
background-color: brown;
color: white;
text-align: center;
}
</style>
</head>
<body>
<header>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">IPTV PLAYER</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li class="active"><a href="index.html">Home</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">M3U8 PLAYER <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="m3u8-converter.html">CONVERT PLAYLIST</a></li>
<li><a href="index-0.html">DAILY PLAYLIST</a></li>
<li><a href="iptv_m3u.html">IPTV M3U</a></li>
</ul>
</li>
<li><a href="m3u8_link.html">M3U8 LINK</a></li>
<li><a href="mac_link.html">MAC PLAYLIST</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="#"><span class="glyphicon glyphicon-user"></span> Sign Up</a></li>
<li><a href="#"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
</ul>
</div>
</div>
</nav>
<h1>Live stream / network media player for Chromecast</h1>
</header>
<div id='app'>
<h4>1. Launch Chromecast session</h4>
<button class="btn" onclick="launchApp()">Launch session</button>
<h4>2. Load network stream</h4>
Enter stream URL (or click to select 24h live stream from the channel list below):<br><br>
<input type="text" onkeyup="guessMimeType(this.value);" style="width:500px;" name="networkStreamUrl" value="" size="70" id="networkStreamUrl" placeholder="Network stream URL, eg. http://sub.domain.tld:port/path/file.ext"><br><br>
<!--Choose media type (cast-only, not required for browser playback):<br>-->
<select name="mediaMimeType" id="mediaMimeType" style="width:500px;color:#a1a1a1;border-color:#ccc;">
<option value="application/vnd.apple.mpegurl">application/vnd.apple.mpegurl (HTTP-Live-Streaming, m3u8 playlists)</option>
<option value="video/mp4">video/mp4 (raw mp4/mkv video files)</option>
<option value="audio/mpeg">audio/mpeg (raw mp3 audio files)</option>
</select>
<div id='iptv-wrapper'>
<h5>ALBANIA IPTV - 24h live streams <a onclick='return toggleChannels();' href='#'><code>[Toggle channel list]</code></a></h5>
<div id='iptv-list' style='display:none;'>
<ul style='float:left;margin:0;margin-right:15px;min-width:300px;'>
<li><a onclick='return setLivestream(0);' href='#'>[ΡΙΚ SAT]</a></li>
<li><a onclick='return setLivestream(1);' href='#'>[SIGMA]</a></li>
<li><a onclick='return setLivestream(2);' href='#'>[VIZION PLUS HD]</a></li>
<li><a onclick='return setLivestream(3);' href='#'>[ABC NEWS ]</a></li>
<li><a onclick='return setLivestream(4);' href='#'>[ERT SPORTS HD]</a></li>
<li><a onclick='return setLivestream(5);' href='#'>[ANT1 HD]</a></li>
<li><a onclick='return setLivestream(6);' href='#'>[Das Erste]</a></li>
<li><a onclick='return setLivestream(7);' href='#'>[CBC SPORT]</a></li>
<li><a onclick='return setLivestream(8);' href='#'>[Claro Sports]</a></li>
<li><a onclick='return setLivestream(9);' href='#'>[My Sports]</a></li>
<li><a onclick='return setLivestream(10);' href='#'>[NTV]</a></li>
<li><a onclick='return setLivestream(11);' href='#'>[RAI UNO]</a></li>
<li><a onclick='return setLivestream(12);' href='#'>[RTK 1]</a></li>
<li><a onclick='return setLivestream(13);' href='#'>[RTL 2 HD]</a></li>
<li><a onclick='return setLivestream(14);' href='#'>[SETANTA SPORT]</a></li>
</ul>
<ul>
<li><a onclick='return setLivestream(15);' href='#'>[SITEL]</a></li>
<li><a onclick='return setLivestream(16);' href='#'>[TF1]</a></li>
<li><a onclick='return setLivestream(17);' href='#'>[Tokyo MX 1]</a></li>
<li><a onclick='return setLivestream(18);' href='#'>[TV7]</a></li>
<li><a onclick='return setLivestream(19);' href='#'>[TVPI (POR)]</a></li>
<li><a onclick='return setLivestream(20);' href='#'>[SLO (SLO)]</a></li>
<li><a onclick='return setLivestream(21);' href='#'>[TV 9]</a></li>
<li><a onclick='return setLivestream(22);' href='#'>[JOJ Ko (CZE)]</a></li>
<li><a onclick='return setLivestream(23);' href='#'>[R.MADRID (ESP)]</a></li>
<li><a onclick='return setLivestream(24);' href='#'>[KTV SPORT]</a></li>
<li><a onclick='return setLivestream(25);' href='#'>[TMC]</a></li>
<li><a onclick='return setLivestream(26);' href='#'>[B1]</a></li>
<li><a onclick='return setLivestream(27);' href='#'>[ANTENA]</a></li>
<li><a onclick='return setLivestream(28);' href='#'>[JAMUNA]</a></li>
<li><a onclick='return setLivestream(29);' href='#'>[NEWS 1]</a></li>
</ul>
</div>
</div>
<div style='display:none;' id='playlist-wrapper'>
<h5>Your playlist</h5>
<ul id='playlist'></ul>
</div>
<h4>3. Choose playback method</h4>
<button type="submit" name="loadCustomMedia" class="btn" onclick="loadCustomMedia();">Cast to device</button> or, alternatively,
<button type="submit" name="playCustomMedia" class="btn" onclick="playCustomMedia();">play in browser</button>
<h4>4. Control playback</h4>
<pre id="debugmessage">
Player state: <span id="playerstate">IDLE</span>
Media position: <span id="progress_tick">00:00:00</span>
Media duration: <span id="duration">00:00:00</span>
Progress bar: <input id="progress" type="range" min="1" max="100" value="0.01" step="0.01" onmouseup="seekMedia(this.value);" style="width:80%;">
Volume bar: <input id="volumething" type="range" min="0" max="100" value="100" step="1" onmouseup="setReceiverVolume(this.value/100,false);">
Volume mute: <a href="#" id="mutelink" onclick="setReceiverVolume(currentVolume, true); this.style.display = 'none'; document.getElementById('unmutelink').style.display = 'initial'; return false; ">Mute</a><a href="#" style="display:none;" id="unmutelink" onclick="setReceiverVolume(currentVolume, false);this.style.display = 'none';document.getElementById('mutelink').style.display = 'initial';return false; ">Unmute</a>
Control media: <a href="#" onclick="playMedia(); return false; " id="playpauseresume" >Play</a></li> <a href="#" onclick="stopMedia(); return false; ">Unload media</a>
Control session: <a href="#" onclick="launchApp(); return false; ">Start session</a></li> <a href="#" onclick="stopApp(); return false; ">Exit session</a>
</pre>
</div>
<p><strong>NOTE</strong>: Chromecast follows the <a href="http://en.wikipedia.org/wiki/Same_origin_policy" target='_blank'>Same-origin policy</a>. Meaning: Chromecast will <b>not</b> play any network media files, unless the streaming server properly supports CORS for <strong>all</strong> requests (using <code>*</code>).<br></p>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'G-WT1VZSV0YP', 'auto');
ga('send', 'pageview');
window.onload = function () {
var queryParams = getQueryParams()
, videos = ('undefined' !== typeof queryParams.urls) ? encodeURI(queryParams.urls) : false;
console.log('Request params:');
console.dir(queryParams);
if (!!videos && '' !== videos) {
createVideoPlaylist(videos);
}
};
</script>
<!-- Based on: https://pwnt.dk/tools/chromecast.php -->
<footer>
<p>Copyright © 2020 Piccolo-tv.</p>
</footer>
</body>
</html>