OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 didGenerateIceCandidate:(RTCIceCandidate *)candidate; | 99 didGenerateIceCandidate:(RTCIceCandidate *)candidate; |
100 | 100 |
101 /** Called when a group of local Ice candidates have been removed. */ | 101 /** Called when a group of local Ice candidates have been removed. */ |
102 - (void)peerConnection:(RTCPeerConnection *)peerConnection | 102 - (void)peerConnection:(RTCPeerConnection *)peerConnection |
103 didRemoveIceCandidates:(NSArray<RTCIceCandidate *> *)candidates; | 103 didRemoveIceCandidates:(NSArray<RTCIceCandidate *> *)candidates; |
104 | 104 |
105 /** New data channel has been opened. */ | 105 /** New data channel has been opened. */ |
106 - (void)peerConnection:(RTCPeerConnection *)peerConnection | 106 - (void)peerConnection:(RTCPeerConnection *)peerConnection |
107 didOpenDataChannel:(RTCDataChannel *)dataChannel; | 107 didOpenDataChannel:(RTCDataChannel *)dataChannel; |
108 | 108 |
109 @optional | |
110 /** Called when a new track is signaled from remote peer. The new track is | |
111 * attached to the RtpReceiver. | |
112 * TODO(zhihuang): Remove the @optional once the downstream applitions implement
this method.*/ | |
113 - (void)peerConnection:(RTCPeerConnection *)peerConnection | |
114 didAddTrack:(RTCRtpReceiver *)rtpReceiver | |
115 streams:(NSArray<RTCMediaStream *> *)mediaStreams; | |
116 | |
117 @end | 109 @end |
118 | 110 |
119 RTC_EXPORT | 111 RTC_EXPORT |
120 @interface RTCPeerConnection : NSObject | 112 @interface RTCPeerConnection : NSObject |
121 | 113 |
122 /** The object that will be notifed about events such as state changes and | 114 /** The object that will be notifed about events such as state changes and |
123 * streams being added or removed. | 115 * streams being added or removed. |
124 */ | 116 */ |
125 @property(nonatomic, weak, nullable) id<RTCPeerConnectionDelegate> delegate; | 117 @property(nonatomic, weak, nullable) id<RTCPeerConnectionDelegate> delegate; |
126 @property(nonatomic, readonly) NSArray<RTCMediaStream *> *localStreams; | 118 @property(nonatomic, readonly) NSArray<RTCMediaStream *> *localStreams; |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 */ | 215 */ |
224 - (void)statsForTrack: | 216 - (void)statsForTrack: |
225 (nullable RTCMediaStreamTrack *)mediaStreamTrack | 217 (nullable RTCMediaStreamTrack *)mediaStreamTrack |
226 statsOutputLevel:(RTCStatsOutputLevel)statsOutputLevel | 218 statsOutputLevel:(RTCStatsOutputLevel)statsOutputLevel |
227 completionHandler: | 219 completionHandler: |
228 (nullable void (^)(NSArray<RTCLegacyStatsReport *> *stats))completionHandler
; | 220 (nullable void (^)(NSArray<RTCLegacyStatsReport *> *stats))completionHandler
; |
229 | 221 |
230 @end | 222 @end |
231 | 223 |
232 NS_ASSUME_NONNULL_END | 224 NS_ASSUME_NONNULL_END |
OLD | NEW |