18

If there is a Chromecast around and:

If the html5 video controls are enabled, the cast buttons shows up in the control bar.

If the html5 video controls are disabled, the cast button shows up on the top left.

enter image description here

I'd like to disable the native controls, but also include my own cast button, kind of what video.js-chromecast does, but the native button still shows up.

Is there anyway to reposition the Cast icon over the html5 video? or completely hide it ?

bentael
  • 1,987
  • 2
  • 21
  • 27
  • And here's the example page used http://jsfiddle.net/bentael/f1quhd2L/5/, I also ended up complaining chez the Chrome team https://code.google.com/p/chromium/issues/detail?id=459083 – bentael Feb 17 '15 at 01:14

2 Answers2

33

There is another options to disable casting button, this option actually disables the button instead of hiding it.

<video disableRemotePlayback src="...">

https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/disableRemotePlayback https://developers.google.com/web/updates/2015/11/presentation-api

Tushar Vaghela
  • 1,203
  • 1
  • 17
  • 25
21

After searching the Chromium source code, I figured out how to do it:

video::-internal-media-controls-overlay-cast-button {
    display: none;
}

Example: http://jsfiddle.net/f1quhd2L/8/

Adam Taylor
  • 4,691
  • 1
  • 37
  • 38
  • 10
    looks like `-internal-media-controls-overlay-cast-button` is being deprecated https://www.chromestatus.com/features/5714245488476160 for the `disableRemotePlayback` attribute. – bentael Jul 18 '17 at 05:44
  • any other solution? – born2net Mar 22 '23 at 11:48