From ac96b64c64d04df8d0882bbd31f6978310d60f56 Mon Sep 17 00:00:00 2001 From: seydx Date: Sun, 16 Mar 2025 14:16:01 +0100 Subject: [PATCH] change codec priority handling for h265 --- www/video-rtc.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/www/video-rtc.js b/www/video-rtc.js index 143ee5a1..7efa0a57 100644 --- a/www/video-rtc.js +++ b/www/video-rtc.js @@ -583,7 +583,10 @@ export class VideoRTC extends HTMLElement { if (stream.getVideoTracks().length > 0) rtcPriority += 0x220; if (stream.getAudioTracks().length > 0) rtcPriority += 0x102; - if (this.mseCodecs.indexOf('hvc1.') >= 0 && !VideoRTC.isH265Supported()) msePriority += 0x230; + if (this.mseCodecs.indexOf('hvc1.')) { + if (VideoRTC.isH265Supported()) rtcPriority += 0x230; + else msePriority += 0x230; + } if (this.mseCodecs.indexOf('avc1.') >= 0) msePriority += 0x210; if (this.mseCodecs.indexOf('mp4a.') >= 0) msePriority += 0x101;