Media.Recorder.isMimeTypeSupported

This article needs a technical review. How you can help.

The MediaRecorder.isMimeTypeSupported() method returns a true that indicates whether the value of the argument is one the user agent can record.

Syntax

var canRecord = MediaRecorder.isMimeTypeSupported(mimeType)

Returns

If true is returned from this method, it only indicates that the MediaRecorder implementation is capable of recording Blob objects for the specified MIME type. Recording may still fail if sufficient resources are not available to support the concrete media encoding.

Parameters

mimeType
The mimeType to check.

Example

var types = ["video/webm", 
             "audio/webm", 
             "video/webm\;codecs=vp8", 
             "video/webm\;codecs=daala", 
             "video/webm\;codecs=h264", 
             "audio/webm\;codecs=opus", 
             "video/mpeg"];

for (var i in types) { 
  console.log( "Is " + types[i] + " supported? " + (MediaRecorder.isTypeSupported(types[i]) ? "Maybe!" : "Nope :(")); 
}

Specifications

Specification Status Comment
MediaStream Recording
The definition of 'isMimeTypeSupported()' in that specification.
Working Draft Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 47.0 25.0 (25.0) ? ? ?
Feature Android Android Webview Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support No support No support 47 25.0 (25.0) ? ? ? 47.0

See also

Document Tags and Contributors

 Contributors to this page: miguelao, rolfedh, jpmedley
 Last updated by: miguelao,