Merge pull request #1644 from seydx/check-h265
Add support for H.265 codec verification
This commit is contained in:
+5
-1
@@ -580,7 +580,11 @@ export class VideoRTC extends HTMLElement {
|
|||||||
|
|
||||||
/** @type {MediaStream} */
|
/** @type {MediaStream} */
|
||||||
const stream = video2.srcObject;
|
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 (stream.getAudioTracks().length > 0) rtcPriority += 0x102;
|
||||||
|
|
||||||
if (this.mseCodecs.indexOf('hvc1.') >= 0) msePriority += 0x230;
|
if (this.mseCodecs.indexOf('hvc1.') >= 0) msePriority += 0x230;
|
||||||
|
|||||||
Reference in New Issue
Block a user