diff options
| author | root <root@dino.fm> | 2017-10-20 10:14:37 -0400 |
|---|---|---|
| committer | root <root@dino.fm> | 2017-10-20 10:14:37 -0400 |
| commit | 215c746c63dd22ad313a8be17729ff5d494ac197 (patch) | |
| tree | a0a85ba3d8640946e9a7d1f9c156f44e06d8b354 | |
| parent | 29386dda7bf76039aa8cb53034564ec8534e0fcb (diff) | |
build
| -rwxr-xr-x | frontend/static/js/sj_compiled.js | 10 |
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) |
