mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed issue with chromecast button not showing up
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
@@ -241,13 +241,15 @@ function init(){
|
|||||||
$("#search").attr("placeholder", "Find song on YouTube...");
|
$("#search").attr("placeholder", "Find song on YouTube...");
|
||||||
|
|
||||||
if(chromecastAvailable){
|
if(chromecastAvailable){
|
||||||
hide_native(1);
|
//hide_native(1);
|
||||||
} else if(chromecastReady) {
|
} else if(chromecastReady) {
|
||||||
initializeCastApi();
|
initializeCastApi();
|
||||||
} else {
|
} else {
|
||||||
window['__onGCastApiAvailable'] = function(loaded, errorInfo) {
|
window['__onGCastApiAvailable'] = function(loaded, errorInfo) {
|
||||||
if (loaded) {
|
if (loaded) {
|
||||||
|
setTimeout(function(){
|
||||||
initializeCastApi();
|
initializeCastApi();
|
||||||
|
}, 1000);
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -255,7 +257,7 @@ function init(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
initializeCastApi = function() {
|
initializeCastApi = function() {
|
||||||
//$(".castButton").css("display", "block");
|
$(".castButton").css("display", "block");
|
||||||
cast.framework.CastContext.getInstance().setOptions({
|
cast.framework.CastContext.getInstance().setOptions({
|
||||||
receiverApplicationId: "E6856E24",
|
receiverApplicationId: "E6856E24",
|
||||||
autoJoinPolicy: chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED});
|
autoJoinPolicy: chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED});
|
||||||
|
|||||||
@@ -205,7 +205,6 @@ var Player = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
loadVideoById: function(id){
|
loadVideoById: function(id){
|
||||||
console.log(id);
|
|
||||||
if(chromecastAvailable){
|
if(chromecastAvailable){
|
||||||
castSession.sendMessage("urn:x-cast:zoff.no", {type: "loadVideo", videoId: id});
|
castSession.sendMessage("urn:x-cast:zoff.no", {type: "loadVideo", videoId: id});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -203,7 +203,7 @@
|
|||||||
<div id="fullscreen">
|
<div id="fullscreen">
|
||||||
<i class="mdi-navigation-fullscreen"></i>
|
<i class="mdi-navigation-fullscreen"></i>
|
||||||
</div>
|
</div>
|
||||||
<button class="castButton mdi-hardware-cast tooltipped" style="display:none;" data-position="top" data-delay="10" data-tooltip="Cast Zöff to TV" is="google-cast-button">
|
<button class="castButton mdi-hardware-cast tooltipped" style="" data-position="top" data-delay="10" data-tooltip="Cast Zöff to TV" is="google-cast-button">
|
||||||
</button>
|
</button>
|
||||||
<button class="castButton-active hide mdi-hardware-cast-connected tooltipped" data-position="top" data-delay="10" data-tooltip="Stop casting" >
|
<button class="castButton-active hide mdi-hardware-cast-connected tooltipped" data-position="top" data-delay="10" data-tooltip="Stop casting" >
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user