Android > Chrome Chromecast icon over html5 video position

早过忘川 提交于 2019-12-22 03:51:38

问题


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.

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 ?


回答1:


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/




回答2:


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



来源:https://stackoverflow.com/questions/28153166/android-chrome-chromecast-icon-over-html5-video-position

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!