I am a stupid person

This commit is contained in:
Kasper Rynning-Tønnesen
2016-11-18 20:09:05 +01:00
parent b648316b51
commit 88dafeb561
3 changed files with 9 additions and 4 deletions

View File

@@ -253,13 +253,18 @@ initializeCastApi = function() {
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})
console.log(full_playlist[0]);
hide_native(1);
$(".castButton").toggleClass("hide");
$(".castButton-active").toggleClass("hide");
break;
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-active").toggleClass("hide");
break;