Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML Audio/Video DOM controller Property

HTML Audio/Video DOM controller Property

HTML audio/video Tag Reference HTML Audio/Video DOM Reference

Example

Detect whether the video has a media controller:

myVid=document.getElementById("video1");

alert("Controller: " + myVid.controller);

Try it »


Definition and Usage

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

By default, the audio/video element has no media controller. If a media controller is specified, the controller property returns it as a MediaController object.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

No major browser supports the controller property.


Syntax

audio|video

.controller

Return Value

Type Description
MediaController Object Represents the media controller of the audio/video.

Properties/methods of the MediaController object:

  • 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 whether the audio/video is paused
  • play() - Play the audio/video
  • pause() - Pause the audio/video
  • played - Check whether 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 whether the audio/video is muted
  • |

    HTML audio/video Tag Reference HTML Audio/Video DOM Reference