Fix for chromecast feature-discovery not showing up

This commit is contained in:
Kasper Rynning-Tønnesen
2017-06-04 22:45:31 +02:00
parent 4757bf263c
commit 7383c8731d
3 changed files with 5 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -490,14 +490,14 @@ initializeCastApi = function() {
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("cast state");
Helper.log(event.castState); Helper.log(event.castState);
console.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;
if(!localStorage.getItem("_chSeen") || localStorage.getItem("_chSeen") == "false") {
if(!localStorage.getItem("_chSeen")) {
$(".castButton-unactive").css("display", "block"); $(".castButton-unactive").css("display", "block");
$('.tap-target').tapTarget('open'); $('.tap-target').tapTarget('open');
localStorage.setItem("_chSeen", false); localStorage.setItem("_chSeen", true);
tap_target_timeout = setTimeout(function() { tap_target_timeout = setTimeout(function() {
$('.tap-target').tapTarget('close'); $('.tap-target').tapTarget('close');
}, 4000); }, 4000);