Javascript examples for DOM HTML Element:Video
The controller property returns the current media controller of the video.
Type | Description |
---|---|
MediaController Object | Represents the media controller of the video. |
MediaController Object properties/methods:
The following code shows how to check if the video has a media controller:
<!DOCTYPE html> <html> <body> <video id="myVideo" width="320" height="240" controls> <source src="your.mp4" type="video/mp4"> <source src="your.ogg" type="video/ogg"> Your browser does not support the video tag. </video>/*from w w w . ja va 2 s.com*/ <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() { var x = document.getElementById("myVideo").controller; document.getElementById("demo").innerHTML = x; } </script> </body> </html>