Fix supported codecs check in JS player

This commit is contained in:
Alexey Khit
2022-12-03 09:39:45 +03:00
parent 3eaaa3fcfa
commit 98c5366ba9
+2 -2
View File
@@ -215,8 +215,8 @@ class VideoRTC extends HTMLElement {
codecs(type) {
const test = type === "mse"
? type => MediaSource.isTypeSupported(type)
: type => this.video.canPlayType(type);
? codec => MediaSource.isTypeSupported(`video/mp4; codecs="${codec}"`)
: codec => this.video.canPlayType(`video/mp4; codecs="${codec}"`);
return this.CODECS.filter(test).join();
}