api.HTMLMediaElement.canPlayType

Spec

MDN URL

Status

On the standards track: Yes

Is Experimental: No

Is Deprecated: No

Browser Support

In Chrome version 3 on 2009-09-15 Note: codecs string can contain any subset of optional parameters (should be all or none). Errors if codecs string contains unexpected characters (should evaluate string up to character).

In Chrome Android version 18 on 2012-06-27 Note: codecs string can contain any subset of optional parameters (should be all or none). Errors if codecs string contains unexpected characters (should evaluate string up to character).

In Edge version 12 on 2015-07-29 Note: codecs string can contain any subset of optional parameters (should be all or none). Errors if codecs string contains unexpected characters (should evaluate string up to character).

In Firefox version 3.5 on 2009-06-30 Note: Before Firefox 28, canPlayType() returned probably when asked about WebM audio or video files without the codecs parameter. Since multiple codecs are supported, this is not enough information to determine if a file can be played, so maybe is now correctly returned. Before Firefox 101, canPlayType() ignored codecs parameter options for av01 codecs (treating them as av1).

In Firefox for Android version 4 on 2011-03-29 Note: Before Firefox for Android 28, canPlayType() returned probably when asked about WebM audio or video files without the codecs parameter. Since multiple codecs are supported, this is not enough information to determine if a file can be played, so maybe is now correctly returned. Before Firefox for Android 101, canPlayType() ignored codecs parameter options for av01 codecs (treating them as av1).

In Internet Explorer version 9 on 2011-03-14

In Quest Browser version 5.0 on undefined Note: codecs string can contain any subset of optional parameters (should be all or none). Errors if codecs string contains unexpected characters (should evaluate string up to character).

In Opera version ≤12.1 on undefined Note: codecs string can contain any subset of optional parameters (should be all or none). Errors if codecs string contains unexpected characters (should evaluate string up to character).

In Opera Android version ≤12.1 on undefined Note: codecs string can contain any subset of optional parameters (should be all or none). Errors if codecs string contains unexpected characters (should evaluate string up to character).

In Safari version 4 on 2009-06-08

In Safari on iOS version 3 on 2009-06-17

In Samsung Internet version 1.0 on 2013-04-27 Note: codecs string can contain any subset of optional parameters (should be all or none). Errors if codecs string contains unexpected characters (should evaluate string up to character).

In WebView Android version 4.4 on 2013-12-09 Note: codecs string can contain any subset of optional parameters (should be all or none). Errors if codecs string contains unexpected characters (should evaluate string up to character).

In WebView on iOS version 3 on 2009-06-17