How to stop chromecast icon appearing in html5 video

441 Views Asked by At

The chromecast icon has recently started appearing in html5 players in both Chrome and Edge. Any idea why and how to remove? Although visible it's not showing up as an element in the dev console.

This jsfddle is showing me the cast icon in the html5 player.

https://jsfiddle.net/charkes/tpq493gx/2/

<video id='video' preload='auto' style="width: 300px;">
    $("#video").on("canplay", function() {
     $("#video")[0].play(); 
    });

ghost cast icon

1

There are 1 best solutions below

0
moloko On BEST ANSWER

If you add a disableRemotePlayback attribute to your <video> tag as per this answer that will prevent the cast button from appearing.

(Adding as a proper answer rather than just a comment)