canPlayType method
Returns a string that specifies whether the client can play a given media resource type.
![]() ![]() |
Syntax
HRESULT retVal = object.canPlayType(type, canPlay);
Parameters
- type [in]
-
Type: BSTR
The type of media that the client can play.
- canPlay [out, retval]
-
Type: BSTR
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.2
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
Build date: 11/12/2012

