import { type dom } from "https://deno.land/x/evt@v2.4.16/lib/types/index.ts";
const { HTMLMediaElement } = dom;
Adds to HTMLElement the properties and methods needed to support basic media-related capabilities that are common to audio and video.
Properties
Returns an AudioTrackList object with the audio tracks for a given video element.
Gets or sets a value that indicates whether to start playing the media automatically.
Gets a collection of buffered time ranges.
Gets or sets a flag that indicates whether the client provides a set of controls for the media (in case the developer does not include controls for the player).
Gets the address or URL of the current media resource that is selected by IHTMLMediaElement.
Gets or sets the default playback rate when the user is not using fast forward or reverse for a video or audio resource.
Returns the duration in seconds of the current media resource. A NaN value is returned if duration is not available, or Infinity if the media resource is streaming.
Returns an object representing the current error state of the audio or video element.
Specifies the purpose of the audio or video media, such as background audio or alerts.
Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
Gets the source associated with the media element for use by the PlayToManager.
Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted.
Gets or sets the current rate of speed for the media resource to play. This speed is expressed as a multiple of the normal speed of the media resource.
Gets TimeRanges for the current media resource that has been played.
Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.
Gets a flag that indicates whether the client is currently moving to a new playback position in the media resource.
Methods
Returns a string that specifies whether the client can play a given media resource type.
Inserts the specified audio effect into media pipeline.
Specifies the media protection manager for a given media pipeline.
Pauses the current playback and sets paused to TRUE. This can be used to test whether the media is playing or paused. You can also use the pause or play events to tell whether the media is playing or not.