-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
147 lines (126 loc) · 5.29 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
<!DOCTYPE html>
<html data-ember-extension="1">
<!--<![endif]-->
<head>
<meta charset="utf-8">
<title>LeapVid</title>
<script type="text/javascript" src="./assets/pd.js"></script>
<script type="text/javascript" async="" src="./assets/inpage_linkid.js" id="undefined"></script>
<script type="text/javascript" async="" src="./assets/bf.min.js"></script>
<script type="text/javascript" async="" src="./assets/ga.js"></script>
<script src="./assets/30715011.js"></script>
</head>
<body id="app" class="satemplate" data-ember-extension="1">
<div class="section padding-extra white" id="demo" style="margin-top: -100px; min-height: 0px;">
<div id="wrap" style="margin: 0 auto; display: table; width: 1350px;">
<div style="float: left; margin: 15px;">
<div id="player1"></div>
<div class="panel panel-default" style="margin-bottom: -30px;">
<div class="panel-heading">Video Player 1's Publish Stream:</div>
<div id="channel1" class="panel-body console" style="height: 100px; overflow: auto;">
</div>
</div>
</div>
<div style="float: left; margin: 15px;">
<div id="player2"></div>
<div class="panel panel-default" style="margin-bottom: -30px;">
<div class="panel-heading">Video Player 2's Publish Stream:</div>
<div id="channel2" class="panel-body console" style="height: 100px; overflow: auto;">
</div>
</div>
</div>
</div>
</div>
<script src="./assets/pubnub.min.js"></script>
<script src="./assets/main.js"></script>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="./videosync.js"></script>
<script>
var consolePrint = function(msg) {
var divId = "channel1";
if (msg.sender === "Player2") {
divId = "channel2";
}
var time = msg.time;
if (time === null) {
$("#" + divId).prepend("{type: " + msg.type + "}<br>");
}
else {
$("#" + divId).prepend("{type: " + msg.type + ", time: " + time + "}<br>");
}
};
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
var playerVars = {
modestbranding: 1,
theme: 'light',
showinfo: 0,
rel: 0,
fs: 0
};
var rand = Math.random().toString();
var vidSync1 = new VideoSync("A9HV5O8Un6k" + rand, "Player1");
var vidSync2 = new VideoSync("A9HV5O8Un6k" + rand, "Player2");
var player1;
var player2;
function onYouTubeIframeAPIReady() {
player1 = new YT.Player('player1', {
height: '390',
width: '640',
videoId: 'A9HV5O8Un6k',
playerVars: playerVars,
events: {
'onReady': vidSync1.onPlayerReady,
'onStateChange': vidSync1.onPlayerStateChange
}
});
player2 = new YT.Player('player2', {
height: '390',
width: '640',
videoId: 'A9HV5O8Un6k',
playerVars: playerVars,
events: {
'onReady': vidSync2.onPlayerReady,
'onStateChange': vidSync2.onPlayerStateChange
}
});
}
var pubnub = PUBNUB.init({
publish_key: 'pub-c-8ca801fc-d70a-4a96-b09a-250ca597a6e9',
subscribe_key: 'sub-c-09c251d0-a40f-11e4-a3fb-0619f8945a4f',
uuid: "the watcher"
});
pubnub.subscribe({
channel: "A9HV5O8Un6k" + rand,
callback: consolePrint
});
</script>
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 1009365105;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="./assets/conversion.js">
</script>
<iframe name="google_conversion_frame" title="Google conversion frame" width="300" height="13" src="./assets/saved_resource.html" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" style="display: none !important;"><img height="1" width="1" border="0" alt="" src="http://googleads.g.doubleclick.net/pagead/viewthroughconversion/1009365105/?frame=0&random=1404231211816&cv=7&fst=1404231211816&num=1&fmt=1&guid=ON&u_h=1440&u_w=2560&u_ah=1418&u_aw=2560&u_cd=24&u_his=1&u_tz=-420&u_java=true&u_nplug=14&u_nmime=72&frm=0&url=http%3A//www.pubnub.com/style-guide/demo-template/&ref=http%3A//getpocket.com/a/queue/" /></iframe>
<noscript>
<div style="display:inline;"> <img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/1009365105/?value=0&amp;guid=ON&amp;script=0"/> </div>
</noscript>
<script type="text/javascript">
var bf_url = "pubnub";
(function () {
var e = document.createElement("script");
e.type = "text/javascript";
e.async = !0;
e.src = "//d2sdf28wg0skh3.cloudfront.net/bf.min.js";
var t = document.getElementsByTagName("script")[0];
t.parentNode.insertBefore(e, t)
})();
</script>
<script type="text/javascript" src="chrome-extension://bmdblncegkenkacieihfhpjfppoconhi/in-page-script.js"></script>
</body>
</html>