MDN wants to learn about developers like you: https://qsurvey.mozilla.com/s3/MDN-dev-survey-2018-1

MediaRecorder.isTypeSupported

这篇翻译不完整。请帮忙从英语翻译这篇文章

 MediaRecorder.isTypeSupported()方法会判断其 MIME 格式能否被客户端记录。

Syntax

var canRecord = MediaRecorder.isTypeSupported(mimeType)

Parameters

mimeType
需要检查的MIME 格式

Return value

true if the MediaRecorder implementation is capable of recording Blob objects for the specified MIME type. Recording may still fail if there are insufficient resources to support the recording and encoding process. If the value is false, the user agent is incapable of recording the specified format.

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 :(")); 
}

规格说明

具体格式 状态 注释
MediaStream Recording
isTypeSupported()
Working Draft Initial definition.

浏览器的支持情况

名称 Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
基本支持 ibenompatChrome(47.0)}} 25.0 (25.0) ? ? ?
名称 Android Android Webview Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile Chrome for Android
基本支持 未实现 未实现 47 25.0 (25.0) ? ? ? 47.0

看过这个的用户还浏览了以下内容:

文档标签和贡献者

 此页面的贡献者: Ende93, wakingking77
 最后编辑者: Ende93,