Skip to content

Commit

Permalink
isCodecSupportedInMp4 test audio codecs as audio
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeijen committed Jul 13, 2018
1 parent 4463892 commit bfdad08
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils/codecs.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ function isCodecType (codec, type) {
}

function isCodecSupportedInMp4 (codec, type) {
if (!type && isCodecType(codec, 'audio')) {
type = 'audio';
}
return window.MediaSource.isTypeSupported(`${type || 'video'}/mp4;codecs="${codec}"`);
}

Expand Down

0 comments on commit bfdad08

Please sign in to comment.