Spaces:
Runtime error
Runtime error
shawarmabytes
commited on
Commit
•
77273e2
1
Parent(s):
bbf42f1
Create angryplaylist.txt
Browse files- angryplaylist.txt +38 -0
angryplaylist.txt
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<html>
|
2 |
+
<body>
|
3 |
+
<div id="player"></div>
|
4 |
+
<script>
|
5 |
+
// 2. This code loads the IFrame Player API code asynchronously.
|
6 |
+
var tag = document.createElement('script');
|
7 |
+
|
8 |
+
tag.src = "https://www.youtube.com/iframe_api";
|
9 |
+
var firstScriptTag = document.getElementsByTagName('script')[0];
|
10 |
+
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
|
11 |
+
|
12 |
+
// 3. This function creates an <iframe> (and YouTube player)
|
13 |
+
// after the API code downloads.
|
14 |
+
function onYouTubeIframeAPIReady() {
|
15 |
+
var numPl = Math.floor((Math.random() * 50) + 1);
|
16 |
+
var player = new YT.Player("player", {
|
17 |
+
height: '315',
|
18 |
+
width: '560',
|
19 |
+
playerVars: {
|
20 |
+
listType:'playlist',
|
21 |
+
list:'PL3-sRm8xAzY-w9GS19pLXMyFRTuJcuUjy',
|
22 |
+
index: numPl,
|
23 |
+
autoplay: 1,
|
24 |
+
},
|
25 |
+
events: {
|
26 |
+
'onReady': function (event) {
|
27 |
+
//event.target.cuePlaylist({list: "PL_MH8gOS_ETiNT1NF8B46JYHZe6fXWfVW"});
|
28 |
+
//event.target.playVideo();
|
29 |
+
setTimeout(function() {
|
30 |
+
event.target.setShuffle({'shufflePlaylist' : true});
|
31 |
+
}, 1000);
|
32 |
+
}
|
33 |
+
}
|
34 |
+
});
|
35 |
+
}
|
36 |
+
</script>
|
37 |
+
</body>
|
38 |
+
</html>
|