play method
Loads and starts playback of a media resource.
![]() ![]() |
Syntax
object.play()Parameters
This method has no parameters.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Standards information
- HTML5 A vocabulary and associated APIs for HTML and XHTML, Section 4.8.9.8
Remarks
To change the URL that is currently playing, assign it to src. This method sets paused to false. To change the URL using the source element, call load before calling play.
See also
- media
- audio
- audio
- video
- How to use HTML5 to play video files on your webpage
- How to use HTML5 to Add an Audio Player to your Webpage
- Make your videos accessible with Timed Text Tracks
Send comments about this topic to Microsoft
Build date: 11/27/2012

