Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 Video // Completely Hide Controls

Tags:

html

video

How Could I completely hide HTML5 video controls?

<video width="300" height="200" controls="false" autoplay="autoplay"> <source src="video/supercoolvideo.mp4" type="video/mp4" /> </video>  

false didn't work -- how is this done?

Cheers.

like image 927
fred randall Avatar asked Jan 04 '13 17:01

fred randall


People also ask

How do I hide video player controls?

Press Ctrl+M to hide or show the YouTube video player controls. When you pause a YouTube video, the player controls don't disappear. That makes it really hard to take a clean screenshot of the video. The controls also block your view, which can get really annoying.

How do I hide video controls in Wordpress?

Put this in your functions. php theme file: add_filter( 'wp_video_shortcode', function( $output ) { $output = str_replace( 'controls="controls"', '', $output ); return $output; } ); Which replaces the controls="controls" attribute in the string with a blank space to omit the feature.


1 Answers

Like this:

<video width="300" height="200" autoplay="autoplay">   <source src="video/supercoolvideo.mp4" type="video/mp4" /> </video> 

controls is a boolean attribute:

Note: The values "true" and "false" are not allowed on boolean attributes. To represent a false value, the attribute has to be omitted altogether.

like image 130
robertc Avatar answered Sep 18 '22 18:09

robertc