Propriedade do controlador DOM de áudio/vídeo HTML

❮ Referência HTML de áudio/vídeo DOM

Exemplo

Verifique se o vídeo tem um controlador de mídia:

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

Definição e uso

A propriedade controller retorna o controlador de mídia atual do áudio/vídeo.

Por padrão, o elemento de áudio/vídeo não possui um controlador de mídia. Se um controlador de mídia for especificado, a propriedade do controlador o retornará como um objeto MediaController.

Dica: Use a propriedade de controles para definir ou retornar se um vídeo deve exibir controles de vídeo padrão.


Suporte ao navegador

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

Sintaxe

audio|video.controller

Valor de retorno

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

❮ Referência HTML de áudio/vídeo DOM