MDL-78391 atto_recordrtc: Fix recording issue with Chrome
This commit is contained in:
+3
-5
@@ -191,9 +191,7 @@ M.atto_recordrtc.commonmodule = {
|
||||
|
||||
getFileExtension: function(type) {
|
||||
if (type === 'audio') {
|
||||
if (window.MediaRecorder.isTypeSupported('audio/webm')) {
|
||||
return 'webm';
|
||||
} else if (window.MediaRecorder.isTypeSupported('audio/ogg')) {
|
||||
if (window.MediaRecorder.isTypeSupported('audio/ogg')) {
|
||||
return 'ogg';
|
||||
} else if (window.MediaRecorder.isTypeSupported('audio/mp4')) {
|
||||
return 'mp4';
|
||||
@@ -493,8 +491,8 @@ M.atto_recordrtc.abstractmodule = {
|
||||
|
||||
if (recType === 'audio') {
|
||||
types = [
|
||||
// Firefox and Chrome both support webm and ogg.
|
||||
'audio/webm;codecs=opus',
|
||||
// Firefox supports webm and ogg but Chrome only supports ogg.
|
||||
// So we use ogg to maximize the compatibility.
|
||||
'audio/ogg;codecs=opus',
|
||||
|
||||
// Safari supports mp4.
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+3
-5
@@ -191,9 +191,7 @@ M.atto_recordrtc.commonmodule = {
|
||||
|
||||
getFileExtension: function(type) {
|
||||
if (type === 'audio') {
|
||||
if (window.MediaRecorder.isTypeSupported('audio/webm')) {
|
||||
return 'webm';
|
||||
} else if (window.MediaRecorder.isTypeSupported('audio/ogg')) {
|
||||
if (window.MediaRecorder.isTypeSupported('audio/ogg')) {
|
||||
return 'ogg';
|
||||
} else if (window.MediaRecorder.isTypeSupported('audio/mp4')) {
|
||||
return 'mp4';
|
||||
@@ -493,8 +491,8 @@ M.atto_recordrtc.abstractmodule = {
|
||||
|
||||
if (recType === 'audio') {
|
||||
types = [
|
||||
// Firefox and Chrome both support webm and ogg.
|
||||
'audio/webm;codecs=opus',
|
||||
// Firefox supports webm and ogg but Chrome only supports ogg.
|
||||
// So we use ogg to maximize the compatibility.
|
||||
'audio/ogg;codecs=opus',
|
||||
|
||||
// Safari supports mp4.
|
||||
|
||||
@@ -80,8 +80,8 @@ M.atto_recordrtc.abstractmodule = {
|
||||
|
||||
if (recType === 'audio') {
|
||||
types = [
|
||||
// Firefox and Chrome both support webm and ogg.
|
||||
'audio/webm;codecs=opus',
|
||||
// Firefox supports webm and ogg but Chrome only supports ogg.
|
||||
// So we use ogg to maximize the compatibility.
|
||||
'audio/ogg;codecs=opus',
|
||||
|
||||
// Safari supports mp4.
|
||||
|
||||
@@ -189,9 +189,7 @@ M.atto_recordrtc.commonmodule = {
|
||||
|
||||
getFileExtension: function(type) {
|
||||
if (type === 'audio') {
|
||||
if (window.MediaRecorder.isTypeSupported('audio/webm')) {
|
||||
return 'webm';
|
||||
} else if (window.MediaRecorder.isTypeSupported('audio/ogg')) {
|
||||
if (window.MediaRecorder.isTypeSupported('audio/ogg')) {
|
||||
return 'ogg';
|
||||
} else if (window.MediaRecorder.isTypeSupported('audio/mp4')) {
|
||||
return 'mp4';
|
||||
|
||||
Reference in New Issue
Block a user