IHTMLMediaElement interface
Provides methods and properties to play audio or video content to the user.
Members
The IHTMLMediaElement interface inherits from the IDispatch interface. IHTMLMediaElement also has these types of members:
- Methods
- Properties
Methods
The IHTMLMediaElement interface has these methods.
Method | Description |
---|---|
canPlayType | Returns a string that specifies whether the client can play a given media resource type. |
load | Resets the audio or video object and loads a new media resource. |
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. |
Properties
The IHTMLMediaElement interface has these properties.
Property | Description |
---|---|
Use the preload element instead. The autobuffer property was initially listed in the W3C spec, but has been dropped. No version of Internet Explorer supports it. |
|
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 (video,audio) that is selected by IHTMLMediaElement. |
|
Gets or sets the current playback position, in seconds. |
|
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 |
|
Gets information about whether the playback has ended or not. |
|
Returns an object representing the current error state of the audio or video element. |
|
Gets the earliest possible position, in seconds, that the playback can begin. The initTime property was initially listed in the W3C spec, but has been dropped. No new version of Internet Explorer supports it. |
|
Gets or sets a flag to specify whether playback should restart after it completes. |
|
Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted. |
|
Gets the current network activity for the element. |
|
Gets a flag that specifies whether playback is paused. |
|
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. |
|
Gets or sets a hint to how much buffering is advisable for a media resource, even if autoplay isn't specified. |
|
Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked. |
|
Gets a flag that indicates whether the the client is currently moving to a new playback position in the media resource. |
|
The address or URL of the a media resource (video, audio) that is to be considered. |
|
Gets or sets the volume level for audio portions of the media element. |
Requirements
Minimum supported client |
Windows Vista with SP1, Windows 7 |
Minimum supported server |
Windows Server 2008 R2 |
Header |
Mshtml.h |
IDL |
Mshtml.idl |
DLL |
Mshtml.dll |