summaryrefslogtreecommitdiff
path: root/frontend/static/js/sj_compiled.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/static/js/sj_compiled.js')
-rwxr-xr-xfrontend/static/js/sj_compiled.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/frontend/static/js/sj_compiled.js b/frontend/static/js/sj_compiled.js
index 7105f35..d2c915c 100755
--- a/frontend/static/js/sj_compiled.js
+++ b/frontend/static/js/sj_compiled.js
@@ -2021,8 +2021,9 @@ var Youtube =
$("li#queue_"+Youtube.video.idx+" span.title").html("<i>This video cannot be embedded</i>")
setTimeout(Youtube.finish, 1000)
},
- onStateChange: function (state)
+ onStateChange: function (e)
{
+ var state = e.data
Youtube.state = state
if (state === -1)
{
@@ -2127,6 +2128,7 @@ var Youtube =
Youtube.pending = false
},
build: function(){
+ if (Youtube.player) return
Youtube.player = new YT.Player("ytscreen", {
// videoId: Youtube.video && Youtube.video.name,
width: Player.width,
@@ -2134,7 +2136,7 @@ var Youtube =
events: {
onReady: Youtube.isReady,
onError: Youtube.error,
- onStateChange: Youtube.statechange,
+ onStateChange: Youtube.onStateChange,
},
playerVars: {
autohide: 1,
@@ -2155,11 +2157,13 @@ var Youtube =
},
init: function () {
d.warn("YOUTUBE INIT")
+ if (window.YT)
+ Youtube.build()
},
};
window.onYouTubePlayerReady = function (playerId) {
- d.warn("YOUTUBE READY")
+ console.log("YOUTUBE READY")
Youtube.build()
}
Player.register(Youtube)