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

HTML DOM Video controller Property

Video controller property

Video Object Reference The Video object

Example

Detect whether the video has a media controller:

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

Try it »


Definition and Usage

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

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

Tip: Use controls The property is used to set or return whether the video displays the standard video controls.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

No major browser supports the controller property.


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 range of the audio/video
  • seekable - get the seekable range 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
  • |

    Video Object Reference The Video object