From 4dc94b806ac15e7c1516d306fdf38b1b6f19d5ea Mon Sep 17 00:00:00 2001 From: Chen Li1 Date: Wed, 14 Apr 2021 15:50:48 +0800 Subject: [PATCH 1/5] Support webrtc unbundle audio/video and separated port setting --- ...nbundle-audio-video-and-port-setting.patch | 99 +++++++++++++++++++ source/agent/webrtc/configLoader.js | 5 + source/agent/webrtc/connection.js | 12 +++ .../agent/webrtc/rtcConn/WebRtcConnection.cc | 15 +++ .../agent/webrtc/rtcConn/WebRtcConnection.h | 4 + source/agent/webrtc/sdpInfo.js | 45 ++++++--- source/agent/webrtc/wrtcConnection.js | 33 ++++++- 7 files changed, 196 insertions(+), 17 deletions(-) create mode 100644 scripts/patches/licode/0022-Support-unbundle-audio-video-and-port-setting.patch diff --git a/scripts/patches/licode/0022-Support-unbundle-audio-video-and-port-setting.patch b/scripts/patches/licode/0022-Support-unbundle-audio-video-and-port-setting.patch new file mode 100644 index 000000000..b9d63a573 --- /dev/null +++ b/scripts/patches/licode/0022-Support-unbundle-audio-video-and-port-setting.patch @@ -0,0 +1,99 @@ +From 86a18375674dd3255b4ed373e0f5a62884c08f7a Mon Sep 17 00:00:00 2001 +From: Chen Li1 +Date: Wed, 14 Apr 2021 15:53:11 +0800 +Subject: [PATCH] Support unbundle audio/video and port setting + +--- + erizo/src/erizo/WebRtcConnection.cpp | 31 +++++++++++++++++++++++++--- + erizo/src/erizo/WebRtcConnection.h | 6 ++++++ + 2 files changed, 34 insertions(+), 3 deletions(-) + +diff --git a/erizo/src/erizo/WebRtcConnection.cpp b/erizo/src/erizo/WebRtcConnection.cpp +index b1438118..1846f14e 100644 +--- a/erizo/src/erizo/WebRtcConnection.cpp ++++ b/erizo/src/erizo/WebRtcConnection.cpp +@@ -339,6 +339,9 @@ bool WebRtcConnection::processRemoteSdp(std::string stream_id) { + if (video_transport_.get() == nullptr) { + ELOG_DEBUG("%s message: Creating videoTransport, ufrag: %s, pass: %s", + toLog(), username.c_str(), password.c_str()); ++ if (!bundle_ && video_ice_config_.media_type == VIDEO_TYPE) { ++ ice_config_ = video_ice_config_; ++ } + video_transport_.reset(new DtlsTransport(VIDEO_TYPE, "video", connection_id_, bundle_, remote_sdp_->isRtcpMux, + listener, ice_config_ , username, password, false, + worker_, io_worker_)); +@@ -356,6 +359,9 @@ bool WebRtcConnection::processRemoteSdp(std::string stream_id) { + if (audio_transport_.get() == nullptr) { + ELOG_DEBUG("%s message: Creating audioTransport, ufrag: %s, pass: %s", + toLog(), username.c_str(), password.c_str()); ++ if (audio_ice_config_.media_type == AUDIO_TYPE) { ++ ice_config_ = audio_ice_config_; ++ } + audio_transport_.reset(new DtlsTransport(AUDIO_TYPE, "audio", connection_id_, bundle_, remote_sdp_->isRtcpMux, + listener, ice_config_, username, password, false, + worker_, io_worker_)); +@@ -588,10 +594,13 @@ void WebRtcConnection::onTransportData(std::shared_ptr packet, Trans + + if (mapping_ssrcs_.count(streamId) == 0) { + // Set SSRC for mid/rsid +- forEachMediaStream([this, streamId, ssrc] (const std::shared_ptr &media_stream) { ++ forEachMediaStream([this, streamId, ssrc, transport] (const std::shared_ptr &media_stream) { + if (media_stream->getId() == streamId) { +- media_stream->setVideoSourceSSRC(ssrc); +- media_stream->setVideoSourceSSRC(ssrc); ++ if (transport->mediaType == AUDIO_TYPE) { ++ media_stream->setAudioSourceSSRC(ssrc); ++ } else if (transport->mediaType == VIDEO_TYPE) { ++ media_stream->setVideoSourceSSRC(ssrc); ++ } + mapping_ssrcs_[streamId] = ssrc; + } + }); +@@ -791,4 +800,20 @@ void WebRtcConnection::setTransport(std::shared_ptr transport) { // + bundle_ = true; + } + ++void WebRtcConnection::setUnbundleAudioPort(int minport, int maxport) { ++ ELOG_DEBUG("Audio port range: %d, %d", minport, maxport); ++ audio_ice_config_ = ice_config_; ++ audio_ice_config_.media_type = AUDIO_TYPE; ++ audio_ice_config_.min_port = (uint16_t) minport; ++ audio_ice_config_.max_port = (uint16_t) maxport; ++} ++ ++void WebRtcConnection::setUnbundleVideoPort(int minport, int maxport) { ++ ELOG_DEBUG("Video port range: %d, %d", minport, maxport); ++ video_ice_config_ = ice_config_; ++ video_ice_config_.media_type = VIDEO_TYPE; ++ video_ice_config_.min_port = (uint16_t) minport; ++ video_ice_config_.max_port = (uint16_t) maxport; ++} ++ + } // namespace erizo +diff --git a/erizo/src/erizo/WebRtcConnection.h b/erizo/src/erizo/WebRtcConnection.h +index 4a9fa449..9fbb1262 100644 +--- a/erizo/src/erizo/WebRtcConnection.h ++++ b/erizo/src/erizo/WebRtcConnection.h +@@ -159,6 +159,9 @@ class WebRtcConnection: public TransportListener, public LogContext, + return "id: " + connection_id_ + ", " + printLogContext(); + } + ++ void setUnbundleAudioPort(int minport, int maxport); ++ void setUnbundleVideoPort(int minport, int maxport); ++ + private: + bool processRemoteSdp(std::string stream_id); + void setRemoteSdpsToMediaStreams(std::string stream_id); +@@ -180,6 +183,9 @@ class WebRtcConnection: public TransportListener, public LogContext, + int bundle_; + WebRtcConnectionEventListener* conn_event_listener_; + IceConfig ice_config_; ++ IceConfig audio_ice_config_; ++ IceConfig video_ice_config_ ; ++ + std::vector rtp_mappings_; + RtpExtensionProcessor extension_processor_; + boost::condition_variable cond_; +-- +2.17.1 + diff --git a/source/agent/webrtc/configLoader.js b/source/agent/webrtc/configLoader.js index 1a8ea3972..243904ee1 100644 --- a/source/agent/webrtc/configLoader.js +++ b/source/agent/webrtc/configLoader.js @@ -59,6 +59,11 @@ module.exports.load = () => { config.webrtc.io_workers = config.webrtc.io_workers || 8; config.webrtc.network_interfaces = config.webrtc.network_interfaces || []; + config.webrtc.audio_minport = config.webrtc.audio_minport || 0; + config.webrtc.audio_maxport = config.webrtc.audio_maxport || 0; + config.webrtc.video_minport = config.webrtc.video_minport || 0; + config.webrtc.video_maxport = config.webrtc.video_maxport || 0; + config.webrtc.network_interfaces.forEach(item => { let addr = networkHelper.getAddress(item.name); if (!addr) { diff --git a/source/agent/webrtc/connection.js b/source/agent/webrtc/connection.js index 459eb80b5..6dd236a66 100644 --- a/source/agent/webrtc/connection.js +++ b/source/agent/webrtc/connection.js @@ -98,6 +98,18 @@ class Connection extends EventEmitter { this.ipAddresses ); + if (global.config.webrtc.audio_minport || + global.config.webrtc.audio_maxport || + global.config.webrtc.video_minport || + global.config.webrtc.video_maxport) { + wrtc.setUnbundleMediaPort( + global.config.webrtc.audio_minport, + global.config.webrtc.audio_maxport, + global.config.webrtc.video_minport, + global.config.webrtc.video_maxport + ); + } + return wrtc; } diff --git a/source/agent/webrtc/rtcConn/WebRtcConnection.cc b/source/agent/webrtc/rtcConn/WebRtcConnection.cc index b58b20bbd..2c540108b 100644 --- a/source/agent/webrtc/rtcConn/WebRtcConnection.cc +++ b/source/agent/webrtc/rtcConn/WebRtcConnection.cc @@ -88,6 +88,8 @@ NAN_MODULE_INIT(WebRtcConnection::Init) { Nan::SetPrototypeMethod(tpl, "setVideoSsrcList", setVideoSsrcList); Nan::SetPrototypeMethod(tpl, "getVideoSsrcMap", getVideoSsrcMap); + Nan::SetPrototypeMethod(tpl, "setUnbundleMediaPort", setUnbundleMediaPort); + constructor.Reset(tpl->GetFunction()); Nan::Set(target, Nan::New("WebRtcConnection").ToLocalChecked(), Nan::GetFunction(tpl).ToLocalChecked()); } @@ -457,6 +459,19 @@ NAN_METHOD(WebRtcConnection::getCurrentState) { info.GetReturnValue().Set(Nan::New(state)); } +NAN_METHOD(WebRtcConnection::setUnbundleMediaPort) { +WebRtcConnection* obj = Nan::ObjectWrap::Unwrap(info.Holder()); + std::shared_ptr me = obj->me; + + int audioMinPort = Nan::To(info[0]).FromJust();; + int audioMaxPort = Nan::To(info[1]).FromJust();; + int videoMinPort = Nan::To(info[2]).FromJust();; + int videoMaxPort = Nan::To(info[3]).FromJust();; + + me->setUnbundleAudioPort(audioMinPort, audioMaxPort); + me->setUnbundleVideoPort(videoMinPort, videoMaxPort); +} + // Async methods void WebRtcConnection::notifyEvent(erizo::WebRTCEvent event, const std::string& message, const std::string& stream_id) { boost::mutex::scoped_lock lock(mutex); diff --git a/source/agent/webrtc/rtcConn/WebRtcConnection.h b/source/agent/webrtc/rtcConn/WebRtcConnection.h index 975172c9c..2f5ddada4 100644 --- a/source/agent/webrtc/rtcConn/WebRtcConnection.h +++ b/source/agent/webrtc/rtcConn/WebRtcConnection.h @@ -132,6 +132,10 @@ class WebRtcConnection : public Nan::ObjectWrap, public erizo::WebRtcConnectionE * Returns the state. */ static NAN_METHOD(getCurrentState); + /* + * Set port range for unbundle audio/video + */ + static NAN_METHOD(setUnbundleMediaPort); static Nan::Persistent constructor; diff --git a/source/agent/webrtc/sdpInfo.js b/source/agent/webrtc/sdpInfo.js index f516c9fd4..c19d8220b 100644 --- a/source/agent/webrtc/sdpInfo.js +++ b/source/agent/webrtc/sdpInfo.js @@ -24,20 +24,31 @@ class SdpInfo { this.obj = transform.parse(str); this.obj.media.forEach((media, i) => { if (media.mid === undefined) { - log.warn(`Media ${i} missing mid`); - media.mid = -1; + log.debug(`Bundle media ${i} missing mid`); + media.mid = -(i+1); } }); } bundleMids() { - const bundles = this.obj.groups.find(g => g.type === 'BUNDLE'); - return bundles.mids.split(' '); + const bundles = this.obj.groups ? + this.obj.groups.find(g => g.type === 'BUNDLE') : null; + return bundles ? bundles.mids.toString().split(' ') : null; } setBundleMids(mids) { - const bundles = this.obj.groups.find(g => g.type === 'BUNDLE'); - bundles.mids = mids.join(' '); + if (!this.obj.groups) { + this.obj.groups = []; + } + if (!mids) { + this.obj.groups = this.obj.groups.filter(g => g.type !== 'BUNDLE'); + } else { + const bundles = this.obj.groups.find(g => g.type === 'BUNDLE'); + if (bundles) { + bundles.mids += ''; + bundles.mids = mids.join(' '); + } + } } mids() { @@ -325,11 +336,13 @@ class SdpInfo { } } - setCredentials({iceUfrag, icePwd, fingerprint}) { + setCredentials({iceUfrag, icePwd, fingerprint}, type) { this.obj.media.forEach(mediaInfo => { - mediaInfo.iceUfrag = iceUfrag; - mediaInfo.icePwd = icePwd; - mediaInfo.fingerprint = fingerprint; + if (!type || type === mediaInfo.type) { + mediaInfo.iceUfrag = iceUfrag; + mediaInfo.icePwd = icePwd; + mediaInfo.fingerprint = fingerprint; + } }); } @@ -350,9 +363,11 @@ class SdpInfo { } } - setCandidates(candidates) { + setCandidates(candidates, type) { this.obj.media.forEach(mediaInfo => { - mediaInfo.candidates = candidates; + if (!type || type === mediaInfo.type) { + mediaInfo.candidates = candidates; + } }); } @@ -577,7 +592,6 @@ class SdpInfo { if (mediaInfo.ext && Array.isArray(mediaInfo.ext)) { const extMappings = [ 'urn:ietf:params:rtp-hdrext:ssrc-audio-level', - 'http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01', 'urn:ietf:params:rtp-hdrext:sdes:mid', 'urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id', 'urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id', @@ -586,6 +600,11 @@ class SdpInfo { // 'urn:3gpp:video-orientation', // 'http://www.webrtc.org/experiments/rtp-hdrext/playout-delay', ]; + if (mediaInfo.type === 'video') { + extMappings.push( + 'http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01' + ); + } mediaInfo.ext = mediaInfo.ext.filter((e) => { return extMappings.includes(e.uri); }); diff --git a/source/agent/webrtc/wrtcConnection.js b/source/agent/webrtc/wrtcConnection.js index 56927a1ba..aeabe0b95 100644 --- a/source/agent/webrtc/wrtcConnection.js +++ b/source/agent/webrtc/wrtcConnection.js @@ -484,6 +484,30 @@ module.exports = function (spec, on_status, on_track) { } localSdp = remoteSdp.answer(); + const bundles = remoteSdp.bundleMids(); + if (!bundles) { + // No bundle + wrtc.wrtc.setUnbundleMediaPort(config) + if (bundles) { + if (bundles.length > 2) { + log.warn('More than 2 media sections in no-bundle SDP'); + for (const i = 2; i < bundles.length; i++) { + log.warn(`MID ${bundles[i]} disabled (no-bundle)`); + remoteSdp.closeMedia(bundles[i]); + localSdp.closeMedia(bundles[i]); + } + } + } + if (mids.length >= 2) { + // Initialize no-bundle transports in native + const tmpSdp = new SdpInfo(remoteSdp.toString()); + tmpSdp.filterMedia([mids[0], mids[1]]); + tmpSdp.setBundleMids(null); + wrtc.setRemoteSdp(tmpSdp.toString(), ''); + } + localSdp.setBundleMids(null); + } + // Setup transport let opId = null; for (const mid of mids) { @@ -563,14 +587,15 @@ module.exports = function (spec, on_status, on_track) { const tempSdp = new SdpInfo(sdpMsg); if (tempSdp.mids().length > 0) { - const tempMid = tempSdp.mids()[0]; localSdp.setMsidSemantic(tempSdp.getMsidSemantic()); - localSdp.setCredentials(tempSdp.getCredentials(tempMid)); - localSdp.setCandidates(tempSdp.getCandidates(tempMid)); + for (const tempMid of tempSdp.mids()) { + const mtype = tempSdp.mediaType(tempMid); + localSdp.setCredentials(tempSdp.getCredentials(tempMid), mtype); + localSdp.setCandidates(tempSdp.getCandidates(tempMid), mtype); + } } else { log.warn('No mid in answer', wrtcId); } - } }; From 77d41464ab03c4a3ab5d316170d0b6e8330c294a Mon Sep 17 00:00:00 2001 From: Chen Li1 Date: Fri, 16 Apr 2021 14:10:18 +0800 Subject: [PATCH 2/5] Add unbundle screen sharing port setting --- source/agent/conference/conference.js | 2 ++ source/agent/webrtc/configLoader.js | 2 ++ source/agent/webrtc/connection.js | 11 +++++++++-- source/agent/webrtc/index.js | 13 ++++++++++--- source/agent/webrtc/wrtcConnection.js | 3 ++- 5 files changed, 25 insertions(+), 6 deletions(-) diff --git a/source/agent/conference/conference.js b/source/agent/conference/conference.js index d1a2fa916..2f5f0a09c 100644 --- a/source/agent/conference/conference.js +++ b/source/agent/conference/conference.js @@ -1355,6 +1355,8 @@ var Conference = function (rpcClient, selfRpcId) { source.optional && source.optional.format && (formatPreference.optional = formatPreference.optional.concat(source.optional.format)); } track.formatPreference = formatPreference; + // Pass subscribe source type (screen-cast...) to rtc node + track.source = source.source; }); } diff --git a/source/agent/webrtc/configLoader.js b/source/agent/webrtc/configLoader.js index 243904ee1..70359d616 100644 --- a/source/agent/webrtc/configLoader.js +++ b/source/agent/webrtc/configLoader.js @@ -63,6 +63,8 @@ module.exports.load = () => { config.webrtc.audio_maxport = config.webrtc.audio_maxport || 0; config.webrtc.video_minport = config.webrtc.video_minport || 0; config.webrtc.video_maxport = config.webrtc.video_maxport || 0; + config.webrtc.screen_minport = config.webrtc.screen_minport || 0; + config.webrtc.screen_maxport = config.webrtc.screen_maxport || 0; config.webrtc.network_interfaces.forEach(item => { let addr = networkHelper.getAddress(item.name); diff --git a/source/agent/webrtc/connection.js b/source/agent/webrtc/connection.js index 6dd236a66..3c164df75 100644 --- a/source/agent/webrtc/connection.js +++ b/source/agent/webrtc/connection.js @@ -66,6 +66,7 @@ class Connection extends EventEmitter { this.metadata = this.options.metadata || {}; this.isProcessingRemoteSdp = false; this.ready = false; + this.isScreen = options.isScreen || false; this.wrtc = this._createWrtc(); } @@ -102,11 +103,17 @@ class Connection extends EventEmitter { global.config.webrtc.audio_maxport || global.config.webrtc.video_minport || global.config.webrtc.video_maxport) { + const videoMinPort = this.isScreen ? + global.config.webrtc.screen_minport : + global.config.webrtc.video_minport; + const videoMaxPort = this.isScreen ? + global.config.webrtc.screen_maxport : + global.config.webrtc.video_maxport; wrtc.setUnbundleMediaPort( global.config.webrtc.audio_minport, global.config.webrtc.audio_maxport, - global.config.webrtc.video_minport, - global.config.webrtc.video_maxport + videoMinPort, + videoMaxPort, ); } diff --git a/source/agent/webrtc/index.js b/source/agent/webrtc/index.js index 100c60dab..11ec1394f 100644 --- a/source/agent/webrtc/index.js +++ b/source/agent/webrtc/index.js @@ -121,7 +121,7 @@ module.exports = function (rpcClient, selfRpcId, parentRpcId, clusterWorkerIP) { } }; - var createWebRTCConnection = function (transportId, controller, owner) { + var createWebRTCConnection = function (transportId, controller, owner, isScreen) { if (peerConnections.has(transportId)) { log.debug('PeerConnection already created:', transportId); return peerConnections.get(transportId); @@ -132,6 +132,7 @@ module.exports = function (rpcClient, selfRpcId, parentRpcId, clusterWorkerIP) { ioThreadPool: ioThreadPool, network_interfaces: global.config.webrtc.network_interfaces, owner, + isScreen, }, function onTransportStatus(status) { notifyTransportStatus(controller, transportId, status); }, function onTrack(trackInfo) { @@ -235,7 +236,10 @@ module.exports = function (rpcClient, selfRpcId, parentRpcId, clusterWorkerIP) { // Generate a transportId } - conn = createWebRTCConnection(options.transportId, options.controller, options.owner); + const isScreen = !!options.tracks.find((track) => ( + track.type === 'video' && track.source === 'screen-cast' + )); + conn = createWebRTCConnection(options.transportId, options.controller, options.owner, isScreen); options.tracks.forEach(function trackOp(t) { conn.addTrackOperation(operationId, t.mid, t.type, 'sendonly', t.formatPreference); }); @@ -288,7 +292,10 @@ module.exports = function (rpcClient, selfRpcId, parentRpcId, clusterWorkerIP) { // Generate a transportId } - conn = createWebRTCConnection(options.transportId, options.controller, options.owner); + const isScreen = !!options.tracks.find((track) => ( + track.type === 'video' && track.source === 'screen-cast' + )); + conn = createWebRTCConnection(options.transportId, options.controller, options.owner, isScreen); options.tracks.forEach(function trackOp(t) { conn.addTrackOperation(operationId, t.mid, t.type, 'recvonly', t.formatPreference); }); diff --git a/source/agent/webrtc/wrtcConnection.js b/source/agent/webrtc/wrtcConnection.js index aeabe0b95..eb4fdbc12 100644 --- a/source/agent/webrtc/wrtcConnection.js +++ b/source/agent/webrtc/wrtcConnection.js @@ -244,6 +244,7 @@ module.exports = function (spec, on_status, on_track) { var ioThreadPool = spec.ioThreadPool; var networkInterfaces = spec.network_interfaces; var owner = spec.owner; + var isScreen = spec.isScreen || false; var remoteSdp = null; var localSdp = null; @@ -640,7 +641,7 @@ module.exports = function (spec, on_status, on_track) { ipAddresses.push(i.ip_address); } }); - wrtc = new Connection(wrtcId, threadPool, ioThreadPool, { ipAddresses }); + wrtc = new Connection(wrtcId, threadPool, ioThreadPool, { ipAddresses, isScreen }); // wrtc.addMediaStream(wrtcId, {label: ''}, direction === 'in'); initWebRtcConnection(wrtc); From e0a91a0171f3a6e969a164d2515ca87c62ccc341 Mon Sep 17 00:00:00 2001 From: Chen Li1 Date: Fri, 16 Apr 2021 15:55:22 +0800 Subject: [PATCH 3/5] Allow keeping original framerate when transcoding --- source/agent/video/index.js | 2 +- source/core/owt_base/VCMFrameEncoder.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/agent/video/index.js b/source/agent/video/index.js index 0e1be5951..b4dfc5d28 100644 --- a/source/agent/video/index.js +++ b/source/agent/video/index.js @@ -750,7 +750,7 @@ function VTranscoder(rpcClient, clusterIP) { motion_factor = 1.0, default_resolution = {width: 0, height: 0}, - default_framerate = 30, + default_framerate = 0, default_kfi = 1000, input_id = undefined, diff --git a/source/core/owt_base/VCMFrameEncoder.cpp b/source/core/owt_base/VCMFrameEncoder.cpp index 79a8aa681..c7e8e6979 100644 --- a/source/core/owt_base/VCMFrameEncoder.cpp +++ b/source/core/owt_base/VCMFrameEncoder.cpp @@ -90,7 +90,9 @@ int32_t VCMFrameEncoder::generateStream(uint32_t width, uint32_t height, uint32_ uint8_t simulcastId {0}; int ret; - assert(frameRate != 0); + if (frameRate == 0) { + frameRate = 30; + } if (width == 0 || height == 0) { m_isAdaptiveMode = true; width = 3840; From d35ff2dcccab0a2d413a237288d7823698ec5d88 Mon Sep 17 00:00:00 2001 From: Chen Li1 Date: Mon, 19 Apr 2021 13:22:35 +0800 Subject: [PATCH 4/5] Add sample configuration for unbundle port range --- source/agent/webrtc/agent.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/agent/webrtc/agent.toml b/source/agent/webrtc/agent.toml index b00309e18..98622e633 100644 --- a/source/agent/webrtc/agent.toml +++ b/source/agent/webrtc/agent.toml @@ -60,6 +60,14 @@ keystorePath = "./cert/certificate.pfx" maxport = 0 #default: 0 minport = 0 #default: 0 +# The webrtc unbundle port range +#audio_minport = 10000 +#audio_maxport = 11000 +#video_minport = 20000 +#video_maxport = 21000 +#screen_minport = 30000 +#screen_maxport = 31000 + #STUN server IP address and port to be used by the server. #if "" is used, the address is discovered locally stunport = 0 #default: 0 From 7d1bdab147856c960ccafb8d587fd85280bc7896 Mon Sep 17 00:00:00 2001 From: Chen Li1 Date: Mon, 26 Apr 2021 13:50:31 +0800 Subject: [PATCH 5/5] Remove redundant port settings --- source/agent/webrtc/wrtcConnection.js | 1 - 1 file changed, 1 deletion(-) diff --git a/source/agent/webrtc/wrtcConnection.js b/source/agent/webrtc/wrtcConnection.js index eb4fdbc12..bdf88b0ee 100644 --- a/source/agent/webrtc/wrtcConnection.js +++ b/source/agent/webrtc/wrtcConnection.js @@ -488,7 +488,6 @@ module.exports = function (spec, on_status, on_track) { const bundles = remoteSdp.bundleMids(); if (!bundles) { // No bundle - wrtc.wrtc.setUnbundleMediaPort(config) if (bundles) { if (bundles.length > 2) { log.warn('More than 2 media sections in no-bundle SDP');