Video controller properties

Definition and usage

controller property returns the current media controller of the video.

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

Hint:Please 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 the video
  • pause() - Pause the video
  • played - Vérifier si la vidéo a été jouée
  • defaultPlaybackRate - Obtenir ou définir la vitesse de lecture par défaut de la vidéo
  • PlaybackRate - Obtenir ou définir la vitesse de lecture actuelle de la vidéo
  • volume - Obtenir ou définir le volume de la vidéo
  • muted - Obtenir ou définir si la vidéo est muette

Support du navigateur

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Non pris en charge Non pris en charge Non pris en charge Non pris en charge Non pris en charge