Skip to content

Commit

Permalink
MDL-81478 tiny_recordrtc: Add webm audio support
Browse files Browse the repository at this point in the history
  • Loading branch information
djarran committed Jul 24, 2024
1 parent 0bad943 commit 8ba8de6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions lib/editor/tiny/plugins/recordrtc/amd/src/audio_recorder.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export default class Audio extends BaseClass {

getSupportedTypes() {
return [
// Firefox supports webm and ogg but Chrome only supports ogg.
// So we use ogg to maximize the compatibility.
// Firefox only supports ogg. Chrome only supports webm.
'audio/ogg;codecs=opus',
'audio/webm;codecs=opus',

// Safari supports mp4.
'audio/mp4;codecs=opus',
Expand Down Expand Up @@ -76,8 +76,11 @@ export default class Audio extends BaseClass {
return 'ogg';
} else if (window.MediaRecorder.isTypeSupported('audio/mp4')) {
return 'mp4';
} else if (window.MediaRecorder.isTypeSupported('audio/webm')) {
return 'webm';
}


window.console.warn(`Unknown file type for MediaRecorder API`);
return '';
}
Expand Down

0 comments on commit 8ba8de6

Please sign in to comment.