diff --git a/www/video-rtc.js b/www/video-rtc.js index fb872b45..a239c679 100644 --- a/www/video-rtc.js +++ b/www/video-rtc.js @@ -580,7 +580,11 @@ export class VideoRTC extends HTMLElement { /** @type {MediaStream} */ const stream = video2.srcObject; - if (stream.getVideoTracks().length > 0) rtcPriority += 0x220; + if (stream.getVideoTracks().length > 0) { + // not the best, but a pretty simple way to check a codec + const isH265Supported = this.pc.remoteDescription.sdp.includes('H265/90000'); + rtcPriority += isH265Supported ? 0x240 : 0x220; + } if (stream.getAudioTracks().length > 0) rtcPriority += 0x102; if (this.mseCodecs.indexOf('hvc1.') >= 0) msePriority += 0x230;