4 #import <Foundation/Foundation.h> 5 #import <WebRTC/RTCMacros.h> 6 #import <WebRTC/RTCLegacyStatsReport.h> 7 #import "OWT/OWTLocalStream.h" 8 #import "OWT/OWTP2PClientConfiguration.h" 9 #import "OWT/OWTP2PPeerConnectionChannelObserver.h" 10 #import "OWT/OWTP2PSignalingChannelProtocol.h" 11 #import "OWT/OWTP2PSignalingSenderProtocol.h" 12 NS_ASSUME_NONNULL_BEGIN
17 @interface OWTP2PClient : NSObject<OWTP2PPeerConnectionChannelObserver,
18 OWTP2PSignalingSenderProtocol,
38 - (void)connect:(NSString*)token
39 onSuccess:(nullable
void (^)(NSString*))onSuccess
40 onFailure:(nullable
void (^)(NSError*))onFailure;
50 - (void)disconnectWithOnSuccess:(nullable
void (^)())onSuccess
51 onFailure:(nullable
void (^)(NSError*))onFailure;
64 - (void)send:(NSString*)message
65 to:(NSString*)targetId
66 onSuccess:(nullable
void (^)())onSuccess
67 onFailure:(nullable
void (^)(NSError*))onFailure;
73 - (void)stop:(NSString*)targetId;
86 to:(NSString*)targetId
88 onFailure:(nullable
void (^)(NSError*))onFailure;
99 - (void)statsFor:(NSString*)targetId
100 onSuccess:(
void (^)(NSArray<RTCLegacyStatsReport*>*))onSuccess
101 onFailure:(nullable
void (^)(NSError*))onFailure;
102 @property(nonatomic, weak) id<OWTP2PClientDelegate> delegate;
103 @property(nonatomic, strong) NSMutableArray<NSString*>* allowedRemoteIds;
124 didReceiveMessage:(NSString*)message
125 from:(NSString*)senderId;
127 NS_ASSUME_NONNULL_END
Publication represents a sender for publishing a stream.
Definition: OWTP2PPublication.h:19
Configuration for OWTP2PClient This configuration is used while creating OWTP2PClient. Changing this configuration does NOT impact existing OWTP2PClients.
Definition: OWTP2PClientConfiguration.h:13
Protocol for signaling channel. Developers may utilize their own signaling server by implementing thi...
Definition: OWTP2PSignalingChannelProtocol.h:13
Signaling channel will notify observer when event triggers.
Definition: OWTP2PSignalingChannelProtocol.h:41
Delegate for OWTConferenceClient.
Definition: OWTP2PClient.h:107
This class represent a local stream.
Definition: OWTLocalStream.h:10
An async client for P2P WebRTC sessions.
Definition: OWTP2PClient.h:17
This class represents a remote stream.
Definition: OWTRemoteStream.h:10