HTML 오디오/비디오 DOM 컨트롤러 속성

❮ HTML 오디오/비디오 DOM 참조

예시

비디오에 미디어 컨트롤러가 있는지 확인:

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

정의 및 사용

controller 속성은 오디오/비디오의 현재 미디어 컨트롤러를 반환합니다.

기본적으로 오디오/비디오 요소에는 미디어 컨트롤러가 없습니다. 미디어 컨트롤러가 지정되면 컨트롤러 속성은 이를 MediaController 객체로 반환합니다.

팁: 비디오가 표준 비디오 컨트롤을 표시해야 하는지 여부를 설정하거나 반환 하려면 controls 속성을 사용하십시오.


브라우저 지원

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

통사론

audio|video.controller

반환 값

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

❮ HTML 오디오/비디오 DOM 참조