Skip to content

Commit dd7130d

Browse files
authored
Merge pull request #1644 from seydx/check-h265
Add support for H.265 codec verification
2 parents df95ce3 + d697bdc commit dd7130d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

www/video-rtc.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,11 @@ export class VideoRTC extends HTMLElement {
580580

581581
/** @type {MediaStream} */
582582
const stream = video2.srcObject;
583-
if (stream.getVideoTracks().length > 0) rtcPriority += 0x220;
583+
if (stream.getVideoTracks().length > 0) {
584+
// not the best, but a pretty simple way to check a codec
585+
const isH265Supported = this.pc.remoteDescription.sdp.includes('H265/90000');
586+
rtcPriority += isH265Supported ? 0x240 : 0x220;
587+
}
584588
if (stream.getAudioTracks().length > 0) rtcPriority += 0x102;
585589

586590
if (this.mseCodecs.indexOf('hvc1.') >= 0) msePriority += 0x230;

0 commit comments

Comments
 (0)