Index: webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCPeerConnection.mm |
diff --git a/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCPeerConnection.mm b/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCPeerConnection.mm |
index 346f0ba6ee8cf7d9bd0f0698712cc3762a466264..1709047e2b1a8a937472eaae33c53de9a0fc1d9e 100644 |
--- a/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCPeerConnection.mm |
+++ b/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCPeerConnection.mm |
@@ -369,6 +369,22 @@ void PeerConnectionDelegateAdapter::OnIceCandidatesRemoved( |
_peerConnection->SetRemoteDescription(observer, sdp.nativeDescription); |
} |
+- (BOOL)setBitrateToMin:(NSNumber *_Nullable)minBitrateBps |
+ toCurrent:(NSNumber *_Nullable)currentBitrateBps |
+ toMax:(NSNumber *_Nullable)maxBitrateBps { |
+ webrtc::PeerConnectionInterface::BitrateParameters params; |
+ if (minBitrateBps != nil) { |
+ params.min_bitrate_bps = rtc::Optional<int>(minBitrateBps.intValue); |
+ } |
+ if (currentBitrateBps != nil) { |
+ params.current_bitrate_bps = rtc::Optional<int>(currentBitrateBps.intValue); |
+ } |
+ if (maxBitrateBps != nil) { |
+ params.max_bitrate_bps = rtc::Optional<int>(maxBitrateBps.intValue); |
+ } |
+ return _peerConnection->SetBitrate(params).ok(); |
+} |
+ |
- (BOOL)startRtcEventLogWithFilePath:(NSString *)filePath |
maxSizeInBytes:(int64_t)maxSizeInBytes { |
RTC_DCHECK(filePath.length); |