Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide native play button for video in google chrome

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?

like image 836
Mishy Avatar asked Dec 19 '16 16:12

Mishy


People also ask

How do I hide the play button on a video tag?

We can hide the controls by not adding the controls attribute to the video element. Even without controls attribute on the elements the user can view the controls section by right-clicking on the video and enabling the show controls .

How do I hide video player controls?

Press Ctrl+M to hide or show the YouTube video player controls.

How can I hide download option in video tag?

You can add controlsList="nodownload" to the video tag as show in the example below and it will turn off the download button.


1 Answers

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;
}
like image 200
Jon Uleis Avatar answered Oct 02 '22 15:10

Jon Uleis