Propiedad del controlador DOM de audio/vídeo HTML

❮ Referencia de DOM de audio/vídeo HTML

Ejemplo

Compruebe si el video tiene un controlador de medios:

var vid = document.getElementById("myVideo");
alert("Controller: " + vid.controller);

Definición y uso

La propiedad del controlador devuelve el controlador de medios actual del audio/video.

De forma predeterminada, el elemento de audio/video no tiene un controlador de medios. Si se especifica un controlador de medios, la propiedad del controlador lo devolverá como un objeto MediaController.

Sugerencia: use la propiedad de controles para establecer o devolver si un video debe mostrar controles de video estándar.


Compatibilidad con navegador

Property
controller Not supported Not supported Not supported Not supported Not supported

Sintaxis

audio|video.controller

Valor devuelto

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

MediaController Object properties/methods:

  • 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 if the audio/video is paused
  • play() - play the audio/video
  • pause() - pause the audio/video
  • played - check if 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 if the audio/video is muted

❮ Referencia de DOM de audio/vídeo HTML