Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit b73b814

Browse files
starwarfanlzhai
authored andcommitted
Add config item for chosing first h264 profile (#161)
1 parent af5833d commit b73b814

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

source/agent/webrtc/agent.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ keystorePath = "./cert/certificate.pfx"
5757
#note, this won't work with all versions of libnice. With 0 all the available ports are used
5858

5959
# The webrtc port range
60-
maxport = 0 #default: 0
6160
minport = 0 #default: 0
61+
maxport = 0 #default: 0
6262

6363
#STUN server IP address and port to be used by the server.
6464
#if "" is used, the address is discovered locally

source/agent/webrtc/wrtcConnection.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,13 @@ module.exports = function (spec, on_status, on_mediaUpdate) {
322322
}
323323
}
324324
} else {
325+
if (global.config.webrtc.h264_profile_selection === 'highest-priority') {
326+
if (selectedPayload < 0) {
327+
tmpProfile = prf;
328+
selectedPayload = fmtp.payload;
329+
}
330+
break;
331+
}
325332
if (h264ProfileOrder.indexOf(tmpProfile) < h264ProfileOrder.indexOf(prf)) {
326333
tmpProfile = prf;
327334
selectedPayload = fmtp.payload;

0 commit comments

Comments
 (0)