Index: webrtc/api/objc/RTCPeerConnection.mm |
diff --git a/webrtc/api/objc/RTCPeerConnection.mm b/webrtc/api/objc/RTCPeerConnection.mm |
index 50d05f1bc699b1aceacd76a6d8740ef31f146aa2..657ba57e26a50f58b389c47d14b665580d639793 100644 |
--- a/webrtc/api/objc/RTCPeerConnection.mm |
+++ b/webrtc/api/objc/RTCPeerConnection.mm |
@@ -19,6 +19,7 @@ |
#import "webrtc/api/objc/RTCMediaConstraints+Private.h" |
#import "webrtc/api/objc/RTCMediaStream+Private.h" |
#import "webrtc/api/objc/RTCPeerConnectionFactory+Private.h" |
+#import "webrtc/api/objc/RTCRtpSender+Private.h" |
#import "webrtc/api/objc/RTCSessionDescription+Private.h" |
#import "webrtc/api/objc/RTCStatsReport+Private.h" |
#import "webrtc/base/objc/RTCLogging.h" |
@@ -311,6 +312,18 @@ void PeerConnectionDelegateAdapter::OnIceCandidate( |
_peerConnection->SetRemoteDescription(observer, sdp.nativeDescription); |
} |
+- (NSArray<RTCRtpSender *> *)senders { |
+ std::vector<rtc::scoped_refptr<webrtc::RtpSenderInterface>> nativeSenders( |
+ _peerConnection->GetSenders()); |
+ NSMutableArray *senders = [[NSMutableArray alloc] init]; |
+ for (const auto &nativeSender : nativeSenders) { |
+ RTCRtpSender *sender = |
+ [[RTCRtpSender alloc] initWithNativeRtpSender:nativeSender]; |
+ [senders addObject:sender]; |
+ } |
+ return senders; |
+} |
+ |
#pragma mark - Private |
+ (webrtc::PeerConnectionInterface::SignalingState)nativeSignalingStateForState: |