Index: webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm |
diff --git a/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm b/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm |
index 57c678032a19be0c489a9fad4a00895f9efdbd25..b91a20021532f555f29b1a66164d8463ac4112f0 100644 |
--- a/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm |
+++ b/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm |
@@ -17,6 +17,7 @@ |
#import "RTCMediaConstraints+Private.h" |
#import "RTCMediaStream+Private.h" |
#import "RTCPeerConnectionFactory+Private.h" |
+#import "RTCRtpReceiver+Private.h" |
#import "RTCRtpSender+Private.h" |
#import "RTCSessionDescription+Private.h" |
#import "RTCStatsReport+Private.h" |
@@ -342,6 +343,18 @@ void PeerConnectionDelegateAdapter::OnIceCandidate( |
return senders; |
} |
+- (NSArray<RTCRtpReceiver *> *)receivers { |
+ std::vector<rtc::scoped_refptr<webrtc::RtpReceiverInterface>> nativeReceivers( |
+ _peerConnection->GetReceivers()); |
+ NSMutableArray *receivers = [[NSMutableArray alloc] init]; |
+ for (const auto &nativeReceiver : nativeReceivers) { |
+ RTCRtpReceiver *receiver = |
+ [[RTCRtpReceiver alloc] initWithNativeRtpReceiver:nativeReceiver]; |
+ [receivers addObject:receiver]; |
+ } |
+ return receivers; |
+} |
+ |
#pragma mark - Private |
+ (webrtc::PeerConnectionInterface::SignalingState)nativeSignalingStateForState: |