From 98c5366ba9d8ae31817019325dda63887a63b296 Mon Sep 17 00:00:00 2001 From: Alexey Khit Date: Sat, 3 Dec 2022 09:39:45 +0300 Subject: [PATCH] Fix supported codecs check in JS player --- www/video-rtc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/video-rtc.js b/www/video-rtc.js index 49e7d527..feef958f 100644 --- a/www/video-rtc.js +++ b/www/video-rtc.js @@ -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(); }