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 a Windows Store app using JavaScript 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.

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.

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 AudioTrack with the specified id in an AudioTrackList.

isTypeSupported (MediaSource)

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

isTypeSupported (MSMediaKeys)

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.

load

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

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.

msSetMediaKeys

Sets the MSMediaKeys to be used for decrypting media data.

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.

removeCue

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

removeSourceBuffer

Removes a source buffer from the MediaSource object.

start

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

update

Sends the key to the key system.

getVideoPlaybackQuality

Gets the quality information about the media element currently playing.

 

 

 

Show:
© 2014 Microsoft