Hide native play button for video in google chrome

左心房为你撑大大i 提交于 2019-11-29 22:14:20

问题


I'm trying to hide the default play button in the center of my video. I have a custom play button but the native play button is displaying underneath it on tablet and mobile. I can't access the CSS for it with either::--webkit-media-controls-play-button or ::-webkit-media-controls-start-playback-button.

I'm having the same issue as https://stackoverflow.com/questions/39602852/disable-download-button-for-google-chrome#= but I'm stuck on finding a similar solution.

Hiding the controls completely with the CSS below will work but I only want to hide the play button in this case.

video::-webkit-media-controls{
    display: none;
    -webkit-appearance: none;
}

Any ideas?


回答1:


Took a bit of searching, but found it in the comments here and confirmed it works on Chrome for Android.

video::-webkit-media-controls-overlay-play-button {
  display: none;
}


来源:https://stackoverflow.com/questions/41227448/hide-native-play-button-for-video-in-google-chrome

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