mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
removed some logging functions, and made lsitening on chromecast better
This commit is contained in:
2
static/dist/embed.min.js
vendored
2
static/dist/embed.min.js
vendored
File diff suppressed because one or more lines are too long
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
@@ -246,12 +246,10 @@ initializeCastApi = function() {
|
|||||||
context.addEventListener(
|
context.addEventListener(
|
||||||
cast.framework.CastContextEventType.SESSION_STATE_CHANGED,
|
cast.framework.CastContextEventType.SESSION_STATE_CHANGED,
|
||||||
function(event) {
|
function(event) {
|
||||||
console.log(event);
|
|
||||||
switch (event.sessionState) {
|
switch (event.sessionState) {
|
||||||
case cast.framework.SessionState.SESSION_STARTED:
|
case cast.framework.SessionState.SESSION_STARTED:
|
||||||
castSession = cast.framework.CastContext.getInstance().getCurrentSession();
|
castSession = cast.framework.CastContext.getInstance().getCurrentSession();
|
||||||
castSession.addMessageListner("urn:x-cast:zoff.no", chromecastListener)
|
castSession.addMessageListner("urn:x-cast:zoff.no", chromecastListener)
|
||||||
window.castSession = cast.framework.CastContext.getInstance().getCurrentSession();
|
|
||||||
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()})
|
||||||
|
|
||||||
@@ -275,8 +273,6 @@ initializeCastApi = function() {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
window.hide_native = hide_native;
|
|
||||||
|
|
||||||
function hide_native(way){
|
function hide_native(way){
|
||||||
if(way == 1){
|
if(way == 1){
|
||||||
$("#controls").toggleClass("hide");
|
$("#controls").toggleClass("hide");
|
||||||
|
|||||||
@@ -139,9 +139,11 @@ var Player = {
|
|||||||
case 2:
|
case 2:
|
||||||
/*if(Helper.mobilecheck() || embed)
|
/*if(Helper.mobilecheck() || embed)
|
||||||
{*/
|
{*/
|
||||||
|
if(!chromecastAvailable){
|
||||||
paused = true;
|
paused = true;
|
||||||
if(window.location.pathname != "/") Playercontrols.play_pause_show();
|
if(window.location.pathname != "/") Playercontrols.play_pause_show();
|
||||||
mobile_beginning = true;
|
mobile_beginning = true;
|
||||||
|
}
|
||||||
/*}
|
/*}
|
||||||
else
|
else
|
||||||
Player.player.playVideo();*/
|
Player.player.playVideo();*/
|
||||||
|
|||||||
Reference in New Issue
Block a user