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 
90 
92 @property (nonatomic) JCMediaChannelVideoLevel videoLevel;
94 @property (nonatomic) JCMediaChannelMergeMode mergeMode;
98 @property (nonatomic) JCMediaChannelMergeModeEx mergeModeEx;
100 @property (nonatomic) int mergeFPS;
102 @property (nonatomic) int mergeBitrate;
104 @property (nonatomic) int mergeHeight;
106 @property (nonatomic) int mergeWidth;
107 
108 @end
109 
113 @interface JCMediaChannelRecordParam : NSObject
114 
120 @property (nonatomic, strong) NSString* __nonnull recordString;
121 
134 +(NSString* __nonnull)buildQiniuRecordParam:(BOOL)video bucketName:(NSString* __nonnull)bucketName secretKey:(NSString* __nonnull)secretKey accessKey:(NSString* __nonnull)accessKey fileName:(NSString* __nonnull)fileName;
135 
149 +(NSString* __nonnull)buildQiniuRecordParam:(BOOL)video bucketName:(NSString* __nonnull)bucketName secretKey:(NSString* __nonnull)secretKey accessKey:(NSString* __nonnull)accessKey fileName:(NSString* __nonnull)fileName videoConfig:(JCMediaChannelRecordParamVideoConfig* __nullable)videoConfig;
150 
164 +(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;
165 
180 +(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 videoConfig:(JCMediaChannelRecordParamVideoConfig* __nullable)videoConfig;
181 
195 +(NSString *__nonnull)buildMinioRecordParam:(BOOL)video bucketName:(NSString *__nonnull)bucketName secretKey:(NSString *__nonnull)secretKey accessKey:(NSString * __nonnull)accessKey endpoint:(NSString * __nonnull)endpoint fileName:(NSString * __nonnull)fileName;
196 
212 +(NSString *__nonnull)buildMinioRecordParam:(BOOL)video bucketName:(NSString *__nonnull)bucketName secretKey:(NSString *__nonnull)secretKey accessKey:(NSString * __nonnull)accessKey endpoint:(NSString * __nonnull)endpoint fileName:(NSString * __nonnull)fileName videoConfig:(JCMediaChannelRecordParamVideoConfig* __nullable)videoConfig;
213 
214 
215 @end
216 
220 @interface JCMediaChannelJoinParam : NSObject
221 
225 @property (nonatomic) int capacity;
231 @property (nonatomic, strong) NSString* __nullable cdn;
237 @property (nonatomic, strong) JCMediaChannelRecordParam * __nullable record;
241 @property (nonatomic, strong) NSString* __nonnull password;
247 @property (nonatomic) bool smooth;
254 @property (nonatomic) JCMediaChannelMaxResolution maxResolution;
256 
261 @property (nonatomic) bool uriMode;
263 
266 @property (nonatomic) int heartbeatTime;
270 @property (nonatomic) int heartbeatTimeout;
274 @property (nonatomic) int framerate;
278 @property (nonatomic, strong) NSString* __nullable customProperty;
303 @property (nonatomic, strong) NSString* __nullable customVideoResolution;
307 @property (nonatomic) float videoRatio;
313 @property (nonatomic) int defaultBitrate;
314 
315 @end
316 
320 @interface JCMediaChannelPropChangeParam : NSObject
321 
327 @property (nonatomic) bool uploadLocalAudio;
328 
334 @property (nonatomic) bool uploadLocalVideo;
335 
341 @property (nonatomic) bool audioOutput;
342 
348 @property (nonatomic) bool cdnState;
349 
355 @property (nonatomic) bool recordState;
356 
362 @property (nonatomic) bool screenShare;
363 
369 @property (nonatomic) bool title;
370 
376 @property (nonatomic) bool customProperty;
377 
378 @end
379 
383 @interface JCMediaChannelScreenShareParam : NSObject
384 
390 @property (nonatomic) int bitrate;
396 @property (nonatomic) int frameRate;
404 @property (nonatomic) int resolution;
405 
406 @end
407 
411 @interface JCMediaChannel : NSObject
412 
416 @property (nonatomic, readonly, copy) NSString* __nullable channelUri;
417 
421 @property (nonatomic, readonly, copy) NSString* __nullable channelId;
422 
426 @property (nonatomic, readonly) int channelNumber;
427 
429 
432 @property (nonatomic, readonly) long confId;
434 
438 @property (nonatomic, readonly, copy) NSString* __nullable sessionId;
439 
443 @property (nonatomic, readonly) NSString* __nonnull password;
444 
454 @property (nonatomic, readonly) JCMediaChannelState state;
455 
459 @property (nonatomic, readonly, strong) NSArray* __nonnull participants;
460 
466 @property (nonatomic, readonly) bool uploadLocalAudio;
467 
473 @property (nonatomic, readonly) bool uploadLocalVideo;
474 
483 @property (nonatomic, readonly) bool audioOutput;
484 
490 @property (nonatomic, readonly, copy) NSString* __nullable screenRenderId;
491 
497 @property (nonatomic, readonly, copy) NSString* __nullable screenUserId;
498 
502 @property (nonatomic, readonly, copy) NSString* __nullable title;
503 
510 @property (nonatomic, readonly) JCMediaChannelRecordState recordState;
511 
518 @property (nonatomic, readonly) JCMediaChannelCdnState cdnState;
519 
523 @property (nonatomic, readonly) JCMediaChannelParticipant* __nullable selfParticipant;
524 
530 @property (nonatomic) bool volumeChangeNotify;
531 
545 @property (nonatomic, readonly) JCMediaChannelMaxResolution maxResolution;
546 
563 +(JCMediaChannel* __nullable)create:(JCClient* __nonnull)client mediaDevice:(JCMediaDevice* __nonnull)mediaDevice callback:(id<JCMediaChannelCallback> __nonnull)callback;
564 
572 +(void)destroy;
573 
582 -(int)query:(NSString* __nonnull)channelId;
583 
598 -(bool)join:(NSString* __nonnull)channelId joinParam:(JCMediaChannelJoinParam* __nullable)joinParam;
599 
609 -(bool)leave;
610 
622 -(bool)stop;
623 
642 -(bool)enableUploadAudioStream:(bool)enable;
643 
662 -(bool)enableUploadVideoStream:(bool)enable;
663 
680 -(bool)enableAudioOutput:(bool)enable;
681 
698 -(bool)requestVideo:(JCMediaChannelParticipant* __nonnull)participant pictureSize:(JCMediaChannelPictureSize)pictureSize;
699 
712 -(bool)enableScreenShare:(bool)enable screenShareParam:(JCMediaChannelScreenShareParam * __nullable)screenShareParam;
713 
730 -(bool)requestScreenVideo:(NSString* __nonnull)screenUri pictureSize:(JCMediaChannelPictureSize)pictureSize;
731 
745 -(bool)enableCdn:(bool)enable keyInterval:(int)keyInterval;
746 
758 -(bool)enableRecord:(bool)enable recordParam:(JCMediaChannelRecordParam* __nullable)recordParam;
759 -(JCMediaChannelParticipant* __nullable)getParticipant:(NSString* __nonnull)userId;
768 
776 -(NSString * __nullable)getStatistics;
777 
788 -(bool)setCustomProperty:(NSString * __nonnull)property;
789 
797 -(NSString * __nullable)getCustomProperty;
798 
813 -(bool)sendMessage:(NSString * __nonnull)type content:(NSString * __nonnull)content toUserId:(NSString * __nullable)toUserId;
814 
826 -(int)inviteSipUser:(NSString * __nonnull)userId sipParam:(JCMediaChannelSipParam* __nonnull)sipParam;
827 
884 -(bool)sendCommand:(NSString * __nonnull)name commandParam:(NSString * __nonnull)param;
885 
892 -(void)setCustomRole:(JCMediaChannelCustomRole)customRole participant:(JCMediaChannelParticipant * __nullable)participant;
893 
899 -(JCMediaChannelCustomRole)getCustomRole;
900 
907 -(void)setCustomState:(JCMediaChannelCustomState)customState participant:(JCMediaChannelParticipant * __nullable)participant;
908 
914 -(JCMediaChannelCustomState)getCustomState;
915 
924 -(BOOL)kick:(JCMediaChannelParticipant * __nonnull)participant;
925 
937 -(bool)sendCommandToDelivery:(NSString* __nonnull)command;
938 
949 -(void)enableSelfVideoRatio:(bool)enable ratio:(float)ratio;
950 
968 -(JCMediaDeviceVideoCanvas* __nullable)startScreenShareVideo:(JCMediaDeviceRender)type pictureSize:(JCMediaChannelPictureSize)pictureSize;
969 
975 -(void)stopScreenShareVideo;
976 
990 -(bool)subscribeParticipantAudio:(JCMediaChannelParticipant *__nonnull)participant subscribe:(bool)subscribe;
991 
992 @end
993 
最后更新时间: 2021/11/9 17:34:32