Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chromecast - sender app - Cast icon not visible HTML5/JS

The problem is that cast icon is not visible even in sample examples by Google in sender application. Month ago i had to refresh the page couple of times to get an icon back or restart the device. Now nothing is working and the icon is missing but in chrome development tools it shows that it is correctly implemented. Do you know what is the problem?

I am creating cast button by:
google-cast-launcher

there are no errors in console

PS. I do also have had implemented the library https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1

like image 330
Jakub Adam Marszałek Avatar asked Dec 29 '25 11:12

Jakub Adam Marszałek


1 Answers

I found a solution. You need to use https:// instead of http:// otherwise the cast icon wont be visible

I hope it helps some of you

@edit if you have problem with not showing icon and in console it shows :

CastVideos.js:125 Uncaught ReferenceError: cast is not defined
    at CastPlayer.initializeCastPlayer (CastVideos.js:125)
    at window.__onGCastApiAvailable (CastVideos.js:1004)
    at chrome.cast.ha (VM1365 cast_sender.js:99)

in your html put script at the beggining of head and script to framework gstatic at the end of body.

like image 127
Jakub Adam Marszałek Avatar answered Jan 01 '26 01:01

Jakub Adam Marszałek



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!