mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Chromecast fixes
This commit is contained in:
4
public/dist/embed.min.js
vendored
4
public/dist/embed.min.js
vendored
File diff suppressed because one or more lines are too long
8
public/dist/main.min.js
vendored
8
public/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -451,6 +451,9 @@ function init(){
|
|||||||
$(".castButton-unactive").css("display", "none");
|
$(".castButton-unactive").css("display", "none");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Helper.log("chromecastAvailable" + chromecastAvailable);
|
||||||
|
Helper.log("chromecastAvailable" + chromecastReady);
|
||||||
|
|
||||||
if(chromecastAvailable){
|
if(chromecastAvailable){
|
||||||
hide_native(1);
|
hide_native(1);
|
||||||
} else if(chromecastReady) {
|
} else if(chromecastReady) {
|
||||||
@@ -484,6 +487,8 @@ initializeCastApi = function() {
|
|||||||
context.addEventListener(
|
context.addEventListener(
|
||||||
cast.framework.CastContextEventType.SESSION_STATE_CHANGED,
|
cast.framework.CastContextEventType.SESSION_STATE_CHANGED,
|
||||||
function(event) {
|
function(event) {
|
||||||
|
Helper.log("session state");
|
||||||
|
Helper.log(event.sessionState);
|
||||||
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();
|
||||||
@@ -535,6 +540,8 @@ initializeCastApi = function() {
|
|||||||
|
|
||||||
var cast_state = cast.framework.CastContext.getInstance();
|
var cast_state = cast.framework.CastContext.getInstance();
|
||||||
cast_state.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED, function(event){
|
cast_state.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED, function(event){
|
||||||
|
Helper.log("cast state");
|
||||||
|
Helper.log(event.castState);
|
||||||
if(event.castState == "NOT_CONNECTED"){
|
if(event.castState == "NOT_CONNECTED"){
|
||||||
$(".castButton-unactive").css("display", "block");
|
$(".castButton-unactive").css("display", "block");
|
||||||
cast_ready_connect = true;
|
cast_ready_connect = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user