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
151@end
152
156@interface JCMediaChannelJoinParam : NSObject
157
161@property (nonatomic) int capacity;
167@property (nonatomic, strong) NSString* __nullable cdn;
173@property (nonatomic, strong) JCMediaChannelRecordParam * __nullable record;
177@property (nonatomic, strong) NSString* __nonnull password;
183@property (nonatomic) bool smooth;
190@property (nonatomic) JCMediaChannelMaxResolution maxResolution;
192
197@property (nonatomic) bool uriMode;
199
202@property (nonatomic) int heartbeatTime;
206@property (nonatomic) int heartbeatTimeout;
210@property (nonatomic) int framerate;
214@property (nonatomic, strong) NSString* __nullable customProperty;
239@property (nonatomic, strong) NSString* __nullable customVideoResolution;
243@property (nonatomic) float videoRatio;
249@property (nonatomic) int defaultBitrate;
250
254@property (nonatomic) int maxSender;
255
256
260@property (nonatomic) JCMediaEncodeType encodeType;
261
262@end
263
267@interface JCMediaChannelPropChangeParam : NSObject
268
274@property (nonatomic) bool uploadLocalAudio;
275
281@property (nonatomic) bool uploadLocalVideo;
282
288@property (nonatomic) bool audioOutput;
289
295@property (nonatomic) bool cdnState;
296
302@property (nonatomic) bool recordState;
303
309@property (nonatomic) bool screenShare;
310
316@property (nonatomic) bool title;
317
323@property (nonatomic) bool customProperty;
324
325@end
326
331
337@property (nonatomic) int bitrate;
343@property (nonatomic) int frameRate;
351@property (nonatomic) int resolution;
352
353@end
354
358@interface JCMediaChannel : NSObject
359
363@property (nonatomic, readonly, copy) NSString* __nullable channelUri;
364
368@property (nonatomic, readonly, copy) NSString* __nullable channelId;
369
373@property (nonatomic, readonly) int channelNumber;
374
376
379@property (nonatomic, readonly) long confId;
381
385@property (nonatomic, readonly, copy) NSString* __nullable sessionId;
386
390@property (nonatomic, readonly) NSString* __nonnull password;
391
401@property (nonatomic, readonly) JCMediaChannelState state;
402
406@property (nonatomic, readonly, strong) NSArray* __nonnull participants;
407
413@property (nonatomic, readonly) bool uploadLocalAudio;
414
420@property (nonatomic, readonly) bool uploadLocalVideo;
421
430@property (nonatomic, readonly) bool audioOutput;
431
437@property (nonatomic, readonly, copy) NSString* __nullable screenRenderId;
438
444@property (nonatomic, readonly, copy) NSString* __nullable screenUserId;
445
449@property (nonatomic, readonly, copy) NSString* __nullable title;
450
457@property (nonatomic, readonly) JCMediaChannelRecordState recordState;
458
465@property (nonatomic, readonly) JCMediaChannelCdnState cdnState;
466
470@property (nonatomic, readonly) JCMediaChannelParticipant* __nullable selfParticipant;
471
477@property (nonatomic) bool volumeChangeNotify;
478
492@property (nonatomic, readonly) JCMediaChannelMaxResolution maxResolution;
493
510+(JCMediaChannel* __nullable)create:(JCClient* __nonnull)client mediaDevice:(JCMediaDevice* __nonnull)mediaDevice callback:(id<JCMediaChannelCallback> __nonnull)callback;
511
519+(void)destroy;
520
529-(int)query:(NSString* __nonnull)channelId;
530
545-(bool)join:(NSString* __nonnull)channelId joinParam:(JCMediaChannelJoinParam* __nullable)joinParam;
546
556-(bool)leave;
557
569-(bool)stop;
570
589-(bool)enableUploadAudioStream:(bool)enable;
590
609-(bool)enableUploadVideoStream:(bool)enable;
610
627-(bool)enableAudioOutput:(bool)enable;
628
645-(bool)requestVideo:(JCMediaChannelParticipant* __nonnull)participant pictureSize:(JCMediaChannelPictureSize)pictureSize;
646
659-(bool)enableScreenShare:(bool)enable screenShareParam:(JCMediaChannelScreenShareParam * __nullable)screenShareParam;
660
661
680- (bool)enableScreenShare:(bool)enable appGroupId:(NSString *)appGroupId preferredExtension:(NSString *)preferredExtension;
681
698-(bool)requestScreenVideo:(NSString* __nonnull)screenUri pictureSize:(JCMediaChannelPictureSize)pictureSize;
699
706-(void)setUseExternalScreenCaptureControl:(bool)useExternalControl;
707
721-(bool)enableCdn:(bool)enable keyInterval:(int)keyInterval;
722
734-(bool)enableRecord:(bool)enable recordParam:(JCMediaChannelRecordParam* __nullable)recordParam;
735
-(JCMediaChannelParticipant* __nullable)getParticipant:(NSString* __nonnull)userId;
744
752-(NSString * __nullable)getStatistics;
753
764-(bool)setCustomProperty:(NSString * __nonnull)property;
765
773-(NSString * __nullable)getCustomProperty;
774
789-(bool)sendMessage:(NSString * __nonnull)type content:(NSString * __nonnull)content toUserId:(NSString * __nullable)toUserId;
790
802-(int)inviteSipUser:(NSString * __nonnull)userId sipParam:(JCMediaChannelSipParam* __nonnull)sipParam;
803
860-(bool)sendCommand:(NSString * __nonnull)name commandParam:(NSString * __nonnull)param;
861
868-(void)setCustomRole:(JCMediaChannelCustomRole)customRole participant:(JCMediaChannelParticipant * __nullable)participant;
869
875-(JCMediaChannelCustomRole)getCustomRole;
876
883-(void)setCustomState:(JCMediaChannelCustomState)customState participant:(JCMediaChannelParticipant * __nullable)participant;
884
890-(JCMediaChannelCustomState)getCustomState;
891
900-(BOOL)kick:(JCMediaChannelParticipant * __nonnull)participant;
901
913-(bool)sendCommandToDelivery:(NSString* __nonnull)command;
914
925-(void)enableSelfVideoRatio:(bool)enable ratio:(float)ratio;
926
944-(JCMediaDeviceVideoCanvas* __nullable)startScreenShareVideo:(JCMediaDeviceRender)type pictureSize:(JCMediaChannelPictureSize)pictureSize;
945
951-(void)stopScreenShareVideo;
952
966-(bool)subscribeParticipantAudio:(JCMediaChannelParticipant *__nonnull)participant subscribe:(bool)subscribe;
967
968@end
969
JCMediaChannelPictureSize
Definition JCMediaChannelConstants.h:63
JCMediaChannelMergeModeEx
Definition JCMediaChannelConstants.h:256
JCMediaChannelCustomState
Definition JCMediaChannelConstants.h:208
JCMediaChannelMergeMode
Definition JCMediaChannelConstants.h:238
JCMediaChannelCdnState
Definition JCMediaChannelConstants.h:180
JCMediaChannelCustomRole
Definition JCMediaChannelConstants.h:192
JCMediaChannelVideoLevel
Definition JCMediaChannelConstants.h:224
JCMediaChannelRecordState
Definition JCMediaChannelConstants.h:168
JCMediaChannelState
Definition JCMediaChannelConstants.h:106
JCMediaChannelMaxResolution
Definition JCMediaChannelConstants.h:79
JCMediaEncodeType
Definition JCMediaChannelConstants.h:91
JCMediaDeviceRender
Definition JCMediaDeviceConstants.h:31
Definition JCClient.h:124
Definition JCMediaChannel.h:359
Definition JCMediaChannel.h:157
Definition JCMediaChannelParticipant.h:84
Definition JCMediaChannel.h:268
Definition JCMediaChannel.h:114
Definition JCMediaChannel.h:90
Definition JCMediaChannel.h:331
Definition JCMediaChannel.h:25
NSString *__nullable dtmfPassowrd
Definition JCMediaChannel.h:56
bool video
Definition JCMediaChannel.h:52
bool route
Definition JCMediaChannel.h:36
NSString *__nonnull toParamString()
bool sipUri
Definition JCMediaChannel.h:30
bool mcu
Definition JCMediaChannel.h:46
NSString *__nullable displayName
Definition JCMediaChannel.h:40
Definition JCMediaChannel.h:70
Definition JCMediaDevice.h:245
Definition JCMediaDeviceVideoCanvas.h:28
最后更新时间: 2024/8/12 13:50:38