Video controllerProperty

Video 对象参考手册Video Object

Examples

Detect whether 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 returns it as a MediaController.

Tip:Use thecontrolsproperty to set or return whether the video displays standard video controls.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

The controller property is not supported by any mainstream browsers.


Syntax

videoObject.controller

Return Value

Value Description
MediaController object

Represents the media controller of the audio/video.

MediaController object properties/methods:

  • buffered - Gets the buffered range of the audio/video
  • seekable - Gets the seekable range of the audio/video
  • duration - Gets the duration of the audio/video
  • currentTime - Gets or sets the current playback position of the audio/video
  • paused - Detects whether the audio/video is paused
  • play() - Plays the audio/video
  • pause() - Pauses the audio/video
  • played - Detects whether the audio/video has been played
  • defaultPlaybackRate - Gets or sets the default playback rate of the audio/video
  • playbackRate - Gets or sets the current playback rate of the audio/video
  • volume - Gets or sets the volume of the audio/video
  • muted - Gets or sets whether the audio/video is muted


Video 对象参考手册Video Object Other extensions