Please note, this is a STATIC archive of website www.w3schools.com from 05 May 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.
THE WORLD'S LARGEST WEB DEVELOPER SITE

HTML Audio/Video DOM controller Property

❮ HTML Audio/Video DOM Reference

Example

Check if the video has a media controller:

var vid = document.getElementById("myVideo");
alert("Controller: " + vid.controller);
Try it Yourself »

Definition and Usage

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

By default the audio/video element does 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 a video should display standard video controls.


Browser Support

Property
controller Not supported Not supported Not supported Not supported Not supported

Syntax

audio|video.controller

Return Value

Type 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 rate of the audio/video
  • playbackRate - get or set the current playback rate of the audio/video
  • volume - get or set the volume of the audio/video
  • muted - get or set if the audio/video is muted

❮ HTML Audio/Video DOM Reference