![]() |
Intel® Collaboration Suite for WebRTC
version 4.3.1
Open WebRTC Toolkit (OWT) Client SDK for iOS*
|
An async client for P2P WebRTC sessions. More...
#import <OWTP2PClient.h>
Instance Methods | |
(instancetype) | - initWithConfiguration:signalingChannel: |
Initialize a OWTP2PClient instance with a specific signaling channel. More... | |
(void) | - connect:onSuccess:onFailure: |
Connect to the signaling server. More... | |
(void) | - disconnectWithOnSuccess:onFailure: |
Disconnect from the signaling server. It will stop all active WebRTC sessions. More... | |
(void) | - send:to:onSuccess:onFailure: |
Send a message to remote client. More... | |
(void) | - stop: |
Stop a WebRTC session. More... | |
(void) | - publish:to:onSuccess:onFailure: |
Publish a stream to the remote client. More... | |
(void) | - statsFor:onSuccess:onFailure: |
Get the connection statistowt with target client. More... | |
![]() | |
(void) | - channel:didReceiveMessage:from: |
This function will be triggered when new message arrives. More... | |
(void) | - channelDidDisconnect: |
This function will be triggered when disconnected from signaling server. | |
Properties | |
id< OWTP2PClientDelegate > | delegate |
NSMutableArray< NSString * > * | allowedRemoteIds |
An async client for P2P WebRTC sessions.
- (void) connect: | (NSString *) | token | |
onSuccess: | (nullable void(^)(NSString *)) | onSuccess | |
onFailure: | (nullable void(^)(NSError *)) | onFailure | |
Connect to the signaling server.
token | A token used for connection and authentication |
onSuccess | Success callback will be invoked with current user's ID if connect to server successfully. |
onFailure | Failure callback will be invoked if one of these cases happened:
|
- (void) disconnectWithOnSuccess: | (nullable void(^)()) | onSuccess | |
onFailure: | (nullable void(^)(NSError *)) | onFailure | |
Disconnect from the signaling server. It will stop all active WebRTC sessions.
onSuccess | Success callback will be invoked if disconnect from server successfully. |
onFailure | Failure callback will be invoked if one of these cases happened:
|
- (instancetype) initWithConfiguration: | (OWTP2PClientConfiguration *) | configuration | |
signalingChannel: | (id< OWTP2PSignalingChannelProtocol >) | signalingChannel | |
Initialize a OWTP2PClient instance with a specific signaling channel.
configuration | Configuration for creating the OWTP2PClient. |
signalingChannel | Signaling channel used for exchange signaling messages. |
- (void) publish: | (OWTLocalStream *) | stream | |
to: | (NSString *) | targetId | |
onSuccess: | (nullable void(^)(OWTP2PPublication *)) | onSuccess | |
onFailure: | (nullable void(^)(NSError *)) | onFailure | |
Publish a stream to the remote client.
stream | The stream which will be published. |
to | Target user's ID. |
onSuccess | Success callback will be invoked it the stream is published. |
onFailure | Failure callback will be invoked if one of these cases happened:
|
- (void) send: | (NSString *) | message | |
to: | (NSString *) | targetId | |
onSuccess: | (nullable void(^)()) | onSuccess | |
onFailure: | (nullable void(^)(NSError *)) | onFailure | |
Send a message to remote client.
message | The message to be sent. |
targetId | Remote user's ID. |
onSuccess | Success callback will be invoked if send deny event successfully. |
onFailure | Failure callback will be invoked if one of the following cases happened.
|
- (void) statsFor: | (NSString *) | targetId | |
onSuccess: | (void(^)(NSArray< RTCLegacyStatsReport * > *)) | onSuccess | |
onFailure: | (nullable void(^)(NSError *)) | onFailure | |
Get the connection statistowt with target client.
targetId | Remote user's ID. |
onSuccess | Success callback will be invoked if get statistoms information successes. |
onFailure | Failure callback will be invoked if one of the following cases happened.
|
- (void) stop: | (NSString *) | targetId |
Stop a WebRTC session.
Clean all resources associated with given remote endpoint. It may include RTCPeerConnection, RTCRtpTransceiver and RTCDataChannel. It still possible to publish a stream, or send a message to given remote endpoint after stop.
targetId | Remote user's ID. |