1 //
2 // JCMediaChannel.h
3 // JCSDK-OC
4 //
5 // Created by maikireton on 2017/8/11.
6 // Copyright © 2017年 juphoon. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 #import "JCMediaChannelCallback.h"
11 #import "JCMediaChannelParticipant.h"
12 #import "JCMediaChannelConstants.h"
13 #import "JCMediaChannelQueryInfo.h"
14 
24 @interface JCMediaChannelSipParamExtra : NSObject
30 @property (nonatomic) bool sipUri;
36 @property (nonatomic) bool route;
40 @property (nonatomic, strong) NSString* __nullable displayName;
46 @property (nonatomic) bool mcu;
52 @property (nonatomic) bool video;
56 @property (nonatomic, strong) NSString* __nullable dtmfPassowrd;
62 -(NSString* __nonnull)toParamString;
63 
64 @end
65 
69 @interface JCMediaChannelSipParam : NSObject
70 
74 @property (nonatomic, strong) NSString* __nullable callerNumber;
78 @property (nonatomic, strong) NSString* __nullable coreNetwork;
82 @property (nonatomic) JCMediaChannelSipParamExtra* __nullable extra;
83 
84 @end
85 
89 @interface JCMediaChannelRecordParam : NSObject
90 
96 @property (nonatomic, strong) NSString* __nonnull recordString;
97 
110 +(NSString* __nonnull)buildQiniuRecordParam:(BOOL)video bucketName:(NSString* __nonnull)bucketName secretKey:(NSString* __nonnull)secretKey accessKey:(NSString* __nonnull)accessKey fileName:(NSString* __nonnull)fileName;
111 
125 +(NSString* __nonnull)buildAliossRecordParam:(BOOL)video bucketName:(NSString* __nonnull)bucketName secretKey:(NSString* __nonnull)secretKey accessKey:(NSString* __nonnull)accessKey endpoint:(NSString* __nonnull)endpoint fileName:(NSString* __nonnull)fileName;
126 
127 @end
128 
132 @interface JCMediaChannelJoinParam : NSObject
133 
137 @property (nonatomic) int capacity;
143 @property (nonatomic, strong) NSString* __nullable cdn;
149 @property (nonatomic, strong) JCMediaChannelRecordParam * __nullable record;
153 @property (nonatomic, strong) NSString* __nonnull password;
159 @property (nonatomic) bool smooth;
166 @property (nonatomic) JCMediaChannelMaxResolution maxResolution;
168 
173 @property (nonatomic) bool uriMode;
175 
178 @property (nonatomic) int heartbeatTime;
182 @property (nonatomic) int heartbeatTimeout;
186 @property (nonatomic) int framerate;
190 @property (nonatomic, strong) NSString* __nullable customProperty;
215 @property (nonatomic, strong) NSString* __nullable customVideoResolution;
219 @property (nonatomic) float videoRatio;
225 @property (nonatomic) int defaultBitrate;
226 
227 @end
228 
232 @interface JCMediaChannelPropChangeParam : NSObject
233 
239 @property (nonatomic) bool uploadLocalAudio;
240 
246 @property (nonatomic) bool uploadLocalVideo;
247 
253 @property (nonatomic) bool audioOutput;
254 
260 @property (nonatomic) bool cdnState;
261 
267 @property (nonatomic) bool recordState;
268 
274 @property (nonatomic) bool screenShare;
275 
281 @property (nonatomic) bool title;
282 
288 @property (nonatomic) bool customProperty;
289 
290 @end
291 
295 @interface JCMediaChannelScreenShareParam : NSObject
296 
302 @property (nonatomic) int bitrate;
308 @property (nonatomic) int frameRate;
316 @property (nonatomic) int resolution;
317 
318 @end
319 
323 @interface JCMediaChannel : NSObject
324 
328 @property (nonatomic, readonly, copy) NSString* __nullable channelUri;
329 
333 @property (nonatomic, readonly, copy) NSString* __nullable channelId;
334 
338 @property (nonatomic, readonly) int channelNumber;
339 
341 
344 @property (nonatomic, readonly) long confId;
346 
350 @property (nonatomic, readonly, copy) NSString* __nullable sessionId;
351 
355 @property (nonatomic, readonly) NSString* __nonnull password;
356 
366 @property (nonatomic, readonly) JCMediaChannelState state;
367 
371 @property (nonatomic, readonly, strong) NSArray* __nonnull participants;
372 
378 @property (nonatomic, readonly) bool uploadLocalAudio;
379 
385 @property (nonatomic, readonly) bool uploadLocalVideo;
386 
395 @property (nonatomic, readonly) bool audioOutput;
396 
402 @property (nonatomic, readonly, copy) NSString* __nullable screenRenderId;
403 
409 @property (nonatomic, readonly, copy) NSString* __nullable screenUserId;
410 
414 @property (nonatomic, readonly, copy) NSString* __nullable title;
415 
422 @property (nonatomic, readonly) JCMediaChannelRecordState recordState;
423 
430 @property (nonatomic, readonly) JCMediaChannelCdnState cdnState;
431 
435 @property (nonatomic, readonly) JCMediaChannelParticipant* __nullable selfParticipant;
436 
442 @property (nonatomic) bool volumeChangeNotify;
443 
457 @property (nonatomic, readonly) JCMediaChannelMaxResolution maxResolution;
458 
475 +(JCMediaChannel* __nullable)create:(JCClient* __nonnull)client mediaDevice:(JCMediaDevice* __nonnull)mediaDevice callback:(id<JCMediaChannelCallback> __nonnull)callback;
476 
484 +(void)destroy;
485 
494 -(int)query:(NSString* __nonnull)channelId;
495 
510 -(bool)join:(NSString* __nonnull)channelId joinParam:(JCMediaChannelJoinParam* __nullable)joinParam;
511 
521 -(bool)leave;
522 
534 -(bool)stop;
535 
554 -(bool)enableUploadAudioStream:(bool)enable;
555 
574 -(bool)enableUploadVideoStream:(bool)enable;
575 
592 -(bool)enableAudioOutput:(bool)enable;
593 
610 -(bool)requestVideo:(JCMediaChannelParticipant* __nonnull)participant pictureSize:(JCMediaChannelPictureSize)pictureSize;
611 
624 -(bool)enableScreenShare:(bool)enable screenShareParam:(JCMediaChannelScreenShareParam * __nullable)screenShareParam;
625 
642 -(bool)requestScreenVideo:(NSString* __nonnull)screenUri pictureSize:(JCMediaChannelPictureSize)pictureSize;
643 
657 -(bool)enableCdn:(bool)enable keyInterval:(int)keyInterval;
658 
670 -(bool)enableRecord:(bool)enable recordParam:(JCMediaChannelRecordParam* __nullable)recordParam;
671 -(JCMediaChannelParticipant* __nullable)getParticipant:(NSString* __nonnull)userId;
680 
688 -(NSString * __nullable)getStatistics;
689 
700 -(bool)setCustomProperty:(NSString * __nonnull)property;
701 
709 -(NSString * __nullable)getCustomProperty;
710 
721 -(bool)sendMessage:(NSString * __nonnull)type content:(NSString * __nonnull)content toUserId:(NSString * __nullable)toUserId;
722 
734 -(int)inviteSipUser:(NSString * __nonnull)userId sipParam:(JCMediaChannelSipParam* __nonnull)sipParam;
735 
792 -(bool)sendCommand:(NSString * __nonnull)name commandParam:(NSString * __nonnull)param;
793 
800 -(void)setCustomRole:(JCMediaChannelCustomRole)customRole participant:(JCMediaChannelParticipant * __nullable)participant;
801 
807 -(JCMediaChannelCustomRole)getCustomRole;
808 
815 -(void)setCustomState:(JCMediaChannelCustomState)customState participant:(JCMediaChannelParticipant * __nullable)participant;
816 
822 -(JCMediaChannelCustomState)getCustomState;
823 
832 -(BOOL)kick:(JCMediaChannelParticipant * __nonnull)participant;
833 
845 -(bool)sendCommandToDelivery:(NSString* __nonnull)command;
846 
857 -(void)enableSelfVideoRatio:(bool)enable ratio:(float)ratio;
858 
876 -(JCMediaDeviceVideoCanvas* __nullable)startScreenShareVideo:(JCMediaDeviceRender)type pictureSize:(JCMediaChannelPictureSize)pictureSize;
877 
883 -(void)stopScreenShareVideo;
884 
898 -(bool)subscribeParticipantAudio:(JCMediaChannelParticipant *__nonnull)participant subscribe:(bool)subscribe;
899 
900 @end
901 
最后更新时间: 2021/1/27上午10:43:31