Frame.html
1.31 KB
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
<!DOCTYPE html>
<html>
<body>
<div id="player0"></div>
<div id="player1"></div>
<div id="player2"></div>
<script>
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 player;
var players = [];
players.push('player0');
players.push('player1');
players.push('player2');
var videoIds = [];
videoIds.push('037o6vxm0es');
videoIds.push('kR77WlHRZrs');
videoIds.push('R6IT_f0XPT8');
function onYouTubeIframeAPIReady()
{
for(var i = 0; i < videoIds.length; i++)
{
player = new YT.Player(players[i], {
height: '360',
width: '640',
videoId: videoIds[i],
events: {
// 'onReady': onPlayerReady,
// 'onStateChange': onPlayerStateChange
}
});
}
}
// function onPlayerReady(event) {
// }
// function onPlayerStateChange(event) {
// }
// function stopVideo() {
// }
</script>
</body>
</html>