Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

canPlayType method

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

HTML5 A vocabulary and associated APIs for HTML and XHTML, Section Explorer 9


 retVal = object.canPlayType(type, canPlay);


type [in]

Type: BSTR

The mime type of media that the client is being asked to play.

canPlay [out, retval]

Type: BSTR


The type of media that is most likely to be rendered.


The type of media that might be able to be rendered

[empty string]

The media type cannot be rendered.

Return value

This method does not return a value.

Standards information

See also

How to use HTML5 to play video files on your webpage
How to use HTML5 to Add an Audio Player to your Webpage



Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.