隐藏iPhone HTML5视频播放按钮

问题描述:

我想隐藏默认显示在< video> 元素

I want to hide the big play button that appears by default on the <video> element

上的大播放按钮有可能吗?

Is it possible?

苹果似乎又改变了影子dom。

It seems Apple has changed the shadow-dom again.

为了隐藏播放按钮控件,你必须使用以下CSS:

In order to hide the play button control you must use the following CSS:

/* This used to work for the parent element of button divs */
/* But it does not work with newer browsers, the below doesn't hide the play button parent div */

*::-webkit-media-controls-panel {
  display: none!important;
  -webkit-appearance: none;
}

/* Old shadow dom for play button */

*::-webkit-media-controls-play-button {
  display: none!important;
  -webkit-appearance: none;
}

/* New shadow dom for play button */

/* This one works! */

*::-webkit-media-controls-start-playback-button {
  display: none!important;
  -webkit-appearance: none;
}