Methods

This section describes the methods associated with the HTML5 Audio and Video APIs.

Note  If you are developing locally or on an intranet and have rendering issues for HTML5, you can add a "meta http-equiv-'X-UA-Compatible' content= " meta command, followed by "IE=edge" to the <head> block of a webpage to force Windows Internet Explorer to use the latest standards. For more information about document compatibility, see Defining Document Compatibility.
 

In this section

TopicDescription

abort

Aborts the processing of the current media segment.

addCue

Add a TextTrackCue object to a TextTrack list of cues.

addSourceBuffer

Creates a new SourceBuffer and adds it to the SourceBuffers property of the MediaSource.

addTextTrack

Create a new TextTrack object to add to an HTML5 video.

appendBuffer

Appends the specified media segment to the SourceBuffer.

appendStream

Appends the media segment data from the specified stream to the SourceBuffer.

canPlayType

Returns a string that specifies whether the client can play a given media resource type.

close

Closes the media key session and release any resources associated with it.

createMediaKeys

Creates a new MediaKeys object for keySystem.

createSession

Initiates a new session with the key system.

end

Returns the end of the time range by using the specified index.

endOfStream

Used to indicate that the end of the stream has been reached.

forEach

Call callback once for each key-value pair present in the MediaKeyStatus map.

generateRequest

Generates a request based on the initialization data.

get

Returns the MediaKeyStatus of the key identified by keyId.

getConfiguration

Returns a MediaKeySystemConfiguration object containing the supported combination of configuration options.

getCueAsHTML

Returns the TextTrackCue text (caption) as a document fragment consisting of HTML elements and other Document Object Model (DOM) nodes .

getCueById

Returns the TextTrackCue (in cue order) for a specified id.

getTrackById

Returns the first track with the specified id in a track list.

getVideoPlaybackQuality

Returns a VideoPlaybackQuality object from for a given video element.

has

Returns true if the status of the key identified by keyId is known.

isTypeSupported (MediaSource)

Verifies if the MediaSource supports creating SourceBuffer objects for the specified MIME type.

isTypeSupported (MSMediaKeys)

Deprecated. Gets a value that indicates if the specified key system supports the specified media type.

item

Returns a track from a list that corresponds with the given index based on track order.

item (SourceBufferList)

Gets the SourceBuffer object at the specified index.

load

Resets the audio or video object and loads a new media resource.

load (MediaKeySession)

Loads the data stored for the specified session.

msClearEffects

Clears all effects from the media pipeline.

msFrameStep

Steps the video by one frame forward or one frame backward.

msInsertAudioEffect

Inserts the specified audio effect into media pipeline.

msInsertVideoEffect

Inserts the specified video effect into media pipeline.

setMediaKeys

Provides the MediaKeys to use when decrypting media during playback.

msSetMediaProtectionManager

Specifies the media protection manager for a given media pipeline.

msSetVideoRectangle

Sets the dimensions of a sub-rectangle within a video.

pause

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.

play

Loads and starts playback of a media resource.

remove

Removes the media segments defined by the specified time range from the SourceBuffer.

remove (MediaKeySession)

Removes stored session data.

removeCue

Remove a specific TextTrackCue from a TextTrack's list of cues.

removeSourceBuffer

Removes a source buffer from the MediaSource object.

requestMediaKeySystemAccess

Requests access to the specified Key System.

setServerCertificate

A promise to a server certificate to be used to encrypt messages to the license server.

start

Gets the start of the time range by using the specified index.

update

Sends messages, including licenses, to the Content Decryption Module.

 

 

 

Show: