Hiding chromecast button on desktop browsers thats not chrome, but showing on mobile

This commit is contained in:
Kasper Rynning-Tønnesen
2017-01-25 21:56:27 +01:00
parent 3f8c8380e4
commit eeb99f2c7b
2 changed files with 4 additions and 2 deletions

View File

@@ -255,9 +255,11 @@ function init(){
$("#embed-button").css("display", "inline-block");
$("#embed-area").val(embed_code(embed_autoplay, embed_width, embed_height, color));
$("#search").attr("placeholder", "Find song on YouTube...");
if(!/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())){
if(!/chrom(e|ium)/.test(navigator.userAgent.toLowerCase()) && !Helper.mobilecheck()){
$(".castButton").css("display", "none");
}
if(chromecastAvailable){
hide_native(1);
} else if(chromecastReady) {