HTML DOM Audio controller Property
THE WORLD'S LARGEST WEB DEVELOPER SITE

Audio controller Property

❮ Audio Object

Example

Find out if the audio has a media controller:

var x = document.getElementById("myAudio").controller;
Try it Yourself »

Definition and Usage

The controller property returns the current media controller of the audio.

By default the <audio> element does not have a media controller. If a media controller is specified, the controller property will return it as a MediaController object.

Tip: Use the controls property to set or return whether a audio should display standard video controls.


Browser Support

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

Syntax

audioObject.controller

Return Value

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

MediaController Object properties/methods:

  • buffered - get the buffered ranges of the audio
  • seekable - get the seekable ranges of the audio
  • duration - get the duration of the audio
  • currentTime - get or set the current playback position of the audio
  • paused - check if the audiois paused
  • play() - play the audio
  • pause() - pause the audio
  • played - check if the audiohas been played
  • defaultPlaybackRate - get or set the default playback rate of the audio
  • playbackRate - get or set the current playback rate of the audio
  • volume - get or set the volume of the audio
  • muted - get or set if the audio is muted

❮ Audio Object