YouTip LogoYouTip

Prop Video Controller

HTML DOM Video controller Property .example { background-color: #f1f1f1; padding: 10px; border: 1px solid #ccc; margin-bottom: 20px; } .example h3 { margin-top: 0; } .note { background-color: #fff3cd; border: 1px solid #ffeeba; color: #856404; padding: 10px; margin-bottom: 20px; } table { width: 100%; border-collapse: collapse; margin-bottom: 20px; } table, th, td { border: 1px solid #ddd; } th, td { padding: 8px; text-align: left; } th { background-color: #f2f2f2; } .browser-support { margin-bottom: 20px; } .browser-support img { margin-right: 5px; }

HTML DOM Video controller Property

Example

Check if the video has a media controller:

var x = document.getElementById("myVideo").controller;

Try it yourself Β»

Definition and Usage

The controller property returns the current media controller of the audio/video.

By default, audio/video elements do not have a media controller. If a media controller is specified, the controller property will return it as a MediaController object.

Tip: Use the controls property to set or return whether the video should display standard video controls.

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The controller property is not supported in any major browser.

Syntax

videoObject.controller

Return Value

Value Description
MediaController object Represents the media controller of the audio/video. MediaController object properties/methods:
  • buffered - Get the buffered ranges of the audio/video
  • seekable - Get the seekable ranges of the audio/video
  • duration - Get the duration of the audio/video
  • currentTime - Get or set the current playback position of the audio/video
  • paused - Check if the audio/video is paused
  • play() - Play the audio/video
  • pause() - Pause the audio/video
  • played - Check if the audio/video has been played
  • defaultPlaybackRate - Get or set the default playback speed of the audio/video
  • playbackRate - Get or set the current playback speed of the audio/video
  • volume - Get or set the volume of the audio/video
  • muted - Get or set whether the audio/video is muted
← Prop Video BufferedProp Video Buffered β†’