Baseline Widely DOM API
api.HTMLMediaElement.canPlayType
Granular MDN Browser Compat Data support history across 14 tracked browsers.
Specification Area
DOM API
Standard track
First Core Launch
Safari 4
2009-06-08
Core-3 Stability
99d
Last: Chrome (2009-09-15)
Baseline Feature
Widely
<audio>
Browser Support Timeline
Notes (6)
Chrome, Edge, Chr And, WV And, Samsung, Opera, Op And, Quest:codecs string can contain any subset of optional parameters (should be all or none).Chrome, Edge, Chr And, WV And, Samsung, Opera, Op And, Quest: Errors if codecs string contains unexpected characters (should evaluate string up to character).Firefox: 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.Firefox: Before Firefox 101, canPlayType() ignored codecs parameter options for av01 codecs (treating them as av1).FF And: 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.FF And: Before Firefox for Android 101, canPlayType() ignored codecs parameter options for av01 codecs (treating them as av1).Full Browser Compatibility Table
| Browser | Type | Version | Release Date | Status / Caveats |
|---|---|---|---|---|
| Chrome | desktop | 3 | 2009-09-15 | Supported |
| Firefox | desktop | 3.5 | 2009-06-30 | Supported |
| Safari | desktop | 4 | 2009-06-08 | Supported |
| Edge | desktop | 12 | 2015-07-29 | Supported |
| Chrome Android | mobile | 18 | 2012-06-27 | Supported |
| Firefox for Android | mobile | 4 | 2011-03-29 | Supported |
| Safari on iOS | mobile | 3 | 2009-06-17 | Supported |
| WebView Android | mobile | 4.4 | 2013-12-09 | Supported |
| WebView on iOS | mobile | 3 | 2009-06-17 | Supported |
| Samsung Browser | mobile | 1.0 | 2013-04-27 | Supported |
| Opera | desktop | ≤12.1 | 2012-11-20 | Supported |
| Opera Android | mobile | ≤12.1 | 2012-10-09 | Supported |
| Deno | server | — | — | — |
| Node.js | server | — | — | — |
| Bun | server | — | — | — |
| Quest Browser | xr | 5.0 | 2018-07-01 | Supported |
| Internet Explorer | desktop | 9 | 2011-03-14 | Supported |