mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
I am a stupid person
This commit is contained in:
@@ -136,7 +136,7 @@ function onPlayerStateChange(event) {
|
|||||||
//channel.send({'event':'stateChange','message':event.data});
|
//channel.send({'event':'stateChange','message':event.data});
|
||||||
console.log(event);
|
console.log(event);
|
||||||
if (event.data==YT.PlayerState.ENDED) {
|
if (event.data==YT.PlayerState.ENDED) {
|
||||||
customMessageBus.broadcast(JSON.stringify({type: -1, videoId: " + videoId + "}));
|
customMessageBus.broadcast(JSON.stringify({type: -1, videoId: videoId}));
|
||||||
//customMessageBus.send("urn:x-cast:zoff.no", {type: -1, videoId: videoId})
|
//customMessageBus.send("urn:x-cast:zoff.no", {type: -1, videoId: videoId})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
4
static/dist/main.min.js
vendored
4
static/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -253,13 +253,18 @@ initializeCastApi = function() {
|
|||||||
chromecastAvailable = true;
|
chromecastAvailable = true;
|
||||||
castSession.sendMessage("urn:x-cast:zoff.no", {type: "loadVideo", videoId: video_id, seekTo: Player.player.getCurrentTime()})
|
castSession.sendMessage("urn:x-cast:zoff.no", {type: "loadVideo", videoId: video_id, seekTo: Player.player.getCurrentTime()})
|
||||||
castSession.sendMessage("urn:x-cast:zoff.no", {type: "nextVideo", videoId: full_playlist[0].id, title: full_playlist[0].title})
|
castSession.sendMessage("urn:x-cast:zoff.no", {type: "nextVideo", videoId: full_playlist[0].id, title: full_playlist[0].title})
|
||||||
console.log(full_playlist[0]);
|
|
||||||
hide_native(1);
|
hide_native(1);
|
||||||
|
|
||||||
$(".castButton").toggleClass("hide");
|
$(".castButton").toggleClass("hide");
|
||||||
$(".castButton-active").toggleClass("hide");
|
$(".castButton-active").toggleClass("hide");
|
||||||
break;
|
break;
|
||||||
case cast.framework.SessionState.SESSION_RESUMED:
|
case cast.framework.SessionState.SESSION_RESUMED:
|
||||||
|
castSession = cast.framework.CastContext.getInstance().getCurrentSession();
|
||||||
|
castSession.addMessageListener("urn:x-cast:zoff.no", chromecastListener)
|
||||||
|
chromecastAvailable = true;
|
||||||
|
castSession.sendMessage("urn:x-cast:zoff.no", {type: "loadVideo", videoId: video_id, seekTo: Player.player.getCurrentTime()})
|
||||||
|
castSession.sendMessage("urn:x-cast:zoff.no", {type: "nextVideo", videoId: full_playlist[0].id, title: full_playlist[0].title})
|
||||||
|
hide_native(1);
|
||||||
$(".castButton").toggleClass("hide");
|
$(".castButton").toggleClass("hide");
|
||||||
$(".castButton-active").toggleClass("hide");
|
$(".castButton-active").toggleClass("hide");
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user