isTypeSupported method
Verifies if the MediaSource supports creating SourceBuffer objects for the specified MIME type.
![]() |
Syntax
var isSupported = MediaSource.isTypeSupported(type);Parameters
- type [in]
-
Type: string
The MIME type to query.
Media file Extension setting Mime type query Audio mp3 mp3 audio/mpeg Audio mp4 m4a audio/mp4 codecs=
- Dolby Digital Plus: "ec-3"
- Dolby Digital: "ac-3"
Audio WebM webm audio/webm Video mp4 mp4 video/mp4 codecs=
- H.264 (AVC1): "avc1.42E01E"
- H.264 (AVC3): "avc3"
Video webm webm video/webm Video HLS m3u9 application/x-mpegURL, audio/x-mpegurl, or vnd.apple.mpegURL Audio WAV(PCM) .wav audio/wav, audio/wave, audio/x-wave, audio/vnd.wave Audio wma .wma audio/x-ms-wma
Return value
Type: boolean
true if the MediaSource supports creating buffers for the specified MIME type; otherwise, false.
Remarks
Dolby Digital Plus and Dolby Digital audio codec support is only available in Microsoft Edge. See the Microsoft Edge Dev Guide for more info.
See also
Show:
