JRTCSDK-iOS v2.0
API文档
JRTCRoom.h
1//
2// JRTCRoom.h
3// JRTCSDK
4//
5// Created by juphoon on 2017/8/11.
6// Copyright © 2017年 juphoon. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
10#import "JRTCRoomCallback.h"
11#import "JRTCRoomParticipant.h"
12#import "JRTCRoomConstants.h"
13#import "JRTCRoomJoinParam.h"
14#import "JRTCRoomQueryInfo.h"
15#import "JRTCSipInviteParam.h"
16#import "JRTCEnum.h"
17#import "JRTCRecordRemoteParam.h"
18#import "JRTCRecordLocalParam.h"
19#import "JRTCModuleBase.h"
20#import "JRTCVideoSize.h"
21
31@interface JRTCRoomPropChangeParam : NSObject
32
38@property (nonatomic, assign) bool uploadLocalAudio;
39
45@property (nonatomic, assign) bool uploadLocalVideo;
46
52@property (nonatomic, assign) bool audioOutput;
53
59@property (nonatomic, assign) bool cdnState;
60
66@property (nonatomic, assign) bool remoteRecordState;
67
73@property (nonatomic, assign) bool screenShare;
74
75@end
76
81
82
88@property (nonatomic, readonly, copy, nullable) NSString *roomId;
89
93@property (nonatomic, readonly, assign) unsigned int roomHandle;
94
98@property (nonatomic, readonly, copy, nullable) NSString *password;
99
109@property (nonatomic, readonly, assign) RoomState state;
110
114@property (nonatomic, readonly, strong, nullable) NSArray *participants;
115
122@property (nonatomic, readonly, assign) bool uploadLocalAudio;
123
130@property (nonatomic, readonly, assign) bool uploadLocalVideo;
131
140@property (nonatomic, readonly, assign) bool audioOutput;
141
147@property (nonatomic, readonly, copy, nullable) NSString *shareStreamId;
148
154@property (nonatomic, readonly, copy, nullable) NSString *shareUserId;
155
162@property (nonatomic, readonly, assign) bool localRecording;
163
167@property (nonatomic, readonly, copy, nullable) NSString *title;
168
175@property (nonatomic, readonly, assign) RecordState remoteRecordState;
176
183@property (nonatomic, readonly, assign) CDNState cdnState;
190@property (nonatomic, assign) bool canBindCamera;
191
198@property (nonatomic, assign) bool notifyVolumeChange;
199
215+ (JRTCRoom* __nullable)create:(JRTCClient* __nonnull)client mediaDevice:(JRTCMediaDevice* __nonnull)mediaDevice callback:(id<JRTCRoomCallback> __nonnull)callback;
216
224+ (void)destroy;
225
234- (int)query:(NSString* __nonnull)roomId;
235
249- (bool)join:(NSString* __nonnull)roomId joinParam:(JRTCRoomJoinParam* __nullable)joinParam;
250
257- (bool)leave;
258
277- (bool)enableUploadAudioStream:(bool)enable;
278
297- (bool)enableUploadVideoStream:(bool)enable;
298
311- (bool)enableAudioOutput:(bool)enable;
312
322- (bool)requestVideo:(JRTCRoomParticipant* __nonnull)participant videoSize:(JRTCVideoSize *__nonnull)videoSize;
323
332- (bool)unRequestVideo:(JRTCRoomParticipant* __nonnull)participant;
333
342- (bool)requestScreenVideo:(JRTCVideoSize *__nonnull)videoSize;
343
351- (bool)unRequestScreenVideo;
352
353
354#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
355
371- (bool)enableScreenShare:(bool)enable appGroupId:(NSString *__nullable)appGroupId preferredExtension:(NSString *__nullable)preferredExtension;
372
373#endif
374
386- (bool)enableCdn:(bool)enable keyInterval:(int)keyInterval;
387
400- (bool)enableRemoteRecord:(bool)enable recordParam:(JRTCRecordRemoteParam* __nullable)recordParam;
401
412- (bool)enableLocalRecord:(bool)enable recordParam:(JRTCRecordLocalParam* __nullable)recordParam;
413
422- (bool)updateLocalRecordLayout:(NSArray<JRTCRecordLocalLayout*>* __nonnull)layoutList;
423
432- (JRTCRoomParticipant* __nullable)getParticipant:(NSString* __nonnull)userId;
433
621- (NSString* __nullable)getStatistics;
622
645- (NSString * __nullable)getJsonStats;
646
656- (bool)setCustomProperty:(NSString* __nonnull)value forKey:(NSString* __nonnull)key;
657
666- (NSString* __nullable)getCustomProperty:(NSString* __nonnull)key;
667
679- (bool)sendMessage:(NSString * __nonnull)type content:(NSString * __nonnull)content toUserId:(NSString * __nullable)toUserId;
680
689- (int)inviteSipUser:(JRTCSipInviteParam *__nonnull)sipParam;
690
702- (bool)setRatio:(float)ratio;
703
715- (bool)sendAudioEmptyPack:(bool)b;
716
728- (bool)sendVideoEmptyPack:(bool)b;
729
738- (bool)setVideoDot:(NSString *__nonnull)timeSpan info:(NSString *__nonnull)info;
739
740@end
741
RoomState
Definition: JRTCEnum.h:124
RecordState
Definition: JRTCEnum.h:200
CDNState
Definition: JRTCEnum.h:188
Definition: JRTCClient.h:21
设备模块
Definition: JRTCMediaDevice.h:134
业务基础类
Definition: JRTCModuleBase.h:16
成员布局配置类
Definition: JRTCRecordLocalParam.h:18
本地录制参数类
Definition: JRTCRecordLocalParam.h:33
远程录制参数类
Definition: JRTCRecordRemoteParam.h:33
Definition: JRTCRoom.h:81
Definition: JRTCRoomJoinParam.h:21
Definition: JRTCRoomParticipant.h:114
Definition: JRTCRoom.h:32
bool uploadLocalVideo
Definition: JRTCRoom.h:45
bool uploadLocalAudio
Definition: JRTCRoom.h:38
bool cdnState
Definition: JRTCRoom.h:59
bool audioOutput
Definition: JRTCRoom.h:52
bool screenShare
Definition: JRTCRoom.h:73
bool remoteRecordState
Definition: JRTCRoom.h:66
邀请sip用户入会的相关参数类
Definition: JRTCSipInviteParam.h:18
Definition: JRTCVideoSize.h:14
Definition: JRTCRoomCallback.h:25