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
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>The Gathering <TMPL_VAR NAME=TG_FULL> Streams</title>
<!-- Mobile specific
---------------------->
<meta name="viewport" content="width=device-width, initial-scale=0.35">
<!-- CSS specifics
-------------------->
<link rel="stylesheet" href="./resources/css/normalize.css">
<link rel="stylesheet" href="./resources/css/skeleton.css">
<link rel="stylesheet" href="./resources/css/core.css">
<link rel="stylesheet" href="./resources/css/button-styles.css">
<style type="text/css">
.vjs-big-play-button {
top:0;
left:0;
right:0;
bottom:0;
margin:auto;
}
</style>
<!-- JavaScript specifics
---------------------------->
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
<link href="//vjs.zencdn.net/5.8/video-js.min.css" rel="stylesheet">
<script type="text/javascript" src="//www.gstatic.com/cv/js/sender/v1/cast_sender.js"></script>
<script type="text/javascript">
function swapVideo (url) {
window.location = '/?url=' + encodeURIComponent(url);//window.btoa(url);
}
var _float = true;
function animateFloat() {
if(_float) {
$("#floater").animate({top: '-=20px'}, "slow");
$("#floater").animate({top: '+=20px'}, "slow", animateFloat);
}
}
function toggleAnimation() {
$('#bubble').stop().fadeOut( 400 );
if(_float) {
_float = false;
$("#floater").delay(800).animate({top: '172px'}, "slow");
} else {
_float = true;
animateFloat();
}
}
$(document).ready(function() {
$("#floater").click(function() {
toggleAnimation();
});
$("#bubble").click(function() {
toggleAnimation();
});
//animateFloat();
//$( "#bubble" ).delay( 5000 ).fadeOut( 400 );
});
</script>
<style type="text/css">
#floater {
position: absolute;
top: 172px;
right: 0px;
width: 531px;
height: 396px;
//background-image: url('/resources/images/floater.svg');
background-size: cover;
}
#bubble {
position: absolute;
visibility: hidden;
top: 62px;
right: 170px;
width: 200px;
height: 25px;
color: #000000;
cursor: pointer;
}
</style>
<!-- creative, event och game -->
</head>
<body>
<div id="header">
<img src="resources/images/thegathering.png" width="400">
</div>
<div class="section">
<div class="container">
<div class="row">
<div class="twelve columns">
<TMPL_UNLESS NAME=NOHEADER>
<video id="stream" class="videoframe video-js vjs-default-skin" controls preload="auto" poster="/resources/images/loading.png" data-setup='{ "autoplay" : <TMPL_VAR NAME=VIDEO_AUTO_PLAY>, "techOrder": ["flash", "html5"]}'>
<source src="<TMPL_VAR NAME=VIDEO_URL_MAIN>" id="videodata" type="video/flv" data-res="720">
<TMPL_IF NAME=VIDEO_URL_MP4><source src="<TMPL_VAR NAME=VIDEO_URL_MP4>" id="videodata" type="video/mp4" data-res="720"></TMPL_IF>
<source src="<TMPL_VAR NAME=VIDEO_URL_FALLBACK>" id="videodata" type="application/x-mpegURL" data-res="720">
<p class="vjs-no-js">
To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
</p>
</video>
</TMPL_UNLESS>
</div>
</div>
<div class="row">
<div class="twelve columns">
<p>Problems with the non game streams? The easiest way to get a hold of us is on IRC (EFNet); Either of ViD or DoXiD should be available if there's too much traffic on #tg to be heard.</p>
</div>
</div>
<div class="row">
<div class="one-half column">
<TMPL_LOOP NAME="STREAMS">
<div class="stream-item">
<img class="stream-icon" src="img/icon_<TMPL_VAR NAME=QUALITY>.png" />
<a href="<TMPL_VAR NAME=VLC_LINK>"><img class="stream-icon" src="/resources/images/vlc.png" /></a>
<img class="stream-icon" src="img/icon_<TMPL_VAR NAME=TYPE>.png" />
<TMPL_VAR NAME=HREF><TMPL_VAR NAME=TITLE></a>
</div>
</TMPL_LOOP>
</div>
<div class="one-half column">
<TMPL_LOOP NAME="CAMSTREAMS">
<div class="stream-item">
<img class="stream-icon" src="img/icon_<TMPL_VAR NAME=QUALITY>.png" />
<a href="<TMPL_VAR NAME=VLC_LINK>"><img class="stream-icon" src="/resources/images/vlc.png" /></a>
<img class="stream-icon" src="img/icon_<TMPL_VAR NAME=TYPE>.png" />
<TMPL_VAR NAME=HREF><TMPL_VAR NAME=TITLE></a>
</div>
</TMPL_LOOP>
</div>
</div>
<div class="row footer">
<div class="twelve columns">
<p><a target="_blank" href="http://stream.tg<TMPL_VAR NAME="TG">.gathering.org">http://stream.tg<TMPL_VAR NAME="TG">.gathering.org</a></p>
</div>
</div>
</div>
</div>
<script src="//vjs.zencdn.net/5.8/video.js"></script>
<script src="./resources/js/videojs-contrib-hls.js"></script>
<script>
// GOOGLE CAST
var current_media;
var session;
function show_castposter() {
stop_loader();
castposter.style.display = 'block';
loader.style.display = 'none';
video.style.display = 'none';
}
function hide_castposter() {
castposter.style.display = 'none';
loader.style.display = 'none';
video.style.display = 'inline';
}
function stop_casting() {
hide_castposter();
if (current_media) {
var media = current_media;
current_media = null;
media.stop();
}
if (session) {
session.stop();
session = null;
}
}
function cast_current_video() {
if (session === undefined || selected_stream === undefined) {
return;
}
var title = streams[selected_stream].name;
var url = streams[selected_stream].url;
document.getElementById('casttarget').textContent = session.receiver.friendlyName;
show_castposter();
video.pause();
// If we are already casting this, do nothing.
if (current_media && current_media.media.contentId === url) {
console.log("Already casting " + url + " to " + session.receiver.friendlyName + " (" + current_media.playerState + ")");
return;
}
if (current_media) {
current_media = null; // Signal to on_media_status_update.
}
var media_info = new chrome.cast.media.MediaInfo(url, "video/mp4");
media_info.metadata = new chrome.cast.media.GenericMediaMetadata();
media_info.metadata.title = global_title; // + ': ' + title;
var request = new chrome.cast.media.LoadRequest(media_info);
session.loadMedia(request,
on_media_discovered.bind(this, 'loadMedia'),
on_media_error);
}
var techOrder = ["html5", "flash"];
if (navigator.userAgent.match(/Trident|Edge|OPR/)) {
console.log("hit!");
techOrder = ["flash", "html5"];
//var video = document.getElementById('video');
//video.src = "http://bleh";
}
var player = videojs('stream', {
techOrder: techOrder
});
player.play();
</script>
</body>
</html>
|