Video controller properties

Definition and usage

controller property returns the current media controller of the video.

By default, the <video> element does not have a media controller. If a media controller is specified, then controller The property returns it as a MediaController object.

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

Instance

Check if the video has a media controller:

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

Try it yourself

Syntax

videoObject.controller

Return value

Type Description
MediaController object

Represents the media controller for the video.

MediaController object properties/methods:

  • buffered - Get the buffered range of the video
  • seekable - Get the seekable range of the video
  • duration - Get the duration of the video
  • currentTime - Get or set the current playback position of the video
  • paused - Check if the video is paused
  • play() - Play video
  • pause() - Pause video
  • played - Tarkista, onko video jo toistettu
  • defaultPlaybackRate - Hae tai aseta videon oletusarvoinen toistonopeus
  • PlaybackRate - Hae tai aseta videon nykyinen toistonopeus
  • volume - Hae tai aseta videon äänenvoimakkuus
  • muted - Hae tai aseta videon äänenvoimakkuus

Selaimen tuki

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Ei tuettu Ei tuettu Ei tuettu Ei tuettu Ei tuettu