extern NSString * const TALKFUN_EVENT_RTC_OPEN; 开启讲台模式
//TODO:开启讲台模式
[self.talkfunSDK on:TALKFUN_EVENT_RTC_OPEN callback:^(id obj) {
}];
extern NSString * const TALKFUN_EVENT_RTC_CLOSE; 关闭讲台模式
//TODO:老师关闭了讲台模式
[self.talkfunSDK on:TALKFUN_EVENT_RTC_CLOSE callback:^(id obj) {
}];
extern NSString * const TALKFUN_EVENT_RTC_LIVE_DURATION ; 直播时长
参数 | 类型 | 描述 |
---|---|---|
year | NSString | 年 |
month | NSString | 月 |
day | NSString | 日 |
hour | NSString | 小时 |
minute | NSString | 分钟 |
second | NSString | 秒 |
//TODO:直播时长
[self.talkfunSDK on:TALKFUN_EVENT_RTC_LIVE_DURATION callback:^(id obj) {
}];
extern NSString * const TALKFUN_EVENT_RTC_AWARD ; 奖励
[self.talkfunSDK on: TALKFUN_EVENT_RTC_AWARD callback:^(id obj) {
}];
extern NSString * const TALKFUN_EVENT_RTC_CONNECTIONINTERRUPTED ; 频道连接断开
//TODO:SDK与频道断开连接
[self.talkfunSDK on:TALKFUN_EVENT_RTC_CONNECTIONINTERRUPTED callback:^(id obj) {
}];
extern NSString * const TALKFUN_EVENT_RTC_RE_CNNECT ; 重新加入频道成功
//SDK重新加入频道
[self.talkfunSDK on:TALKFUN_EVENT_RTC_RE_CNNECT callback:^(id obj) {
}];
--------------下面所有 允许上讲台 的主要参数说明--------------
参数 | 类型 | 描述 |
---|---|---|
view | UIView | 视频预览容器 |
dict | 用户数据 | 字典 |
-------------- 允许上讲台内dict主要参数说明--------------
参数 | 类型 | 描述 |
---|---|---|
audio | NSString | 音频权限 |
drawPower | NSString | 涂鸦权限 |
role | NSString | 角色(有老师与同学) |
time | NSString | 送花 |
video | NSString | 视频权限 |
xid | NSString | 唯一标识 |
isMe | NSString | 是不是是自己 |
extern NSString * const TALKFUN_EVENT_RTC_USER_UP; 允许上讲台
[self.talkfunSDK on:TALKFUN_EVENT_RTC_USER_UP callback:^(id obj) {
}];
typedef NS_ENUM(NSInteger,TalkfunApplyStatus) {
// 未申请 NoApply
TalkfunApplyStatusNoApply = 0,
// 申请上讲台
TalkfunApplyStatusApplying = 1,
// 讲台上
TalkfunApplyStatusAllow = 2,
};
typedef NS_ENUM(NSInteger,TalkfunMediaPower) {
//老师操作关闭设备
TalkfunMediaPowerCloseForZHUBO = 0,
//老师操作打开设备
TalkfunMediaPowerOpenForZHUBO = 1,
//学员操作关闭设备
TalkfunMediaPowerCloseForUser = 10,
//学员操作打开设备
TalkfunMediaPowerOpenForUser = 11,
};
@interface TalkfunSDKPlatform : NSObject
//申请状态 ApplyStatus
@property (nonatomic,assign) TalkfunApplyStatus applyStatus;
--------------下面所有 result 的主要参数说明--------------
参数 | 类型 | 描述 |
---|---|---|
audio | NSString | 音频权限 |
drawPower | NSString | 涂鸦权限 |
role | NSString | 角色(有老师与同学) |
time | NSString | 送花 |
video | NSString | 视频权限 |
xid | NSString | 唯一标识 |
isMe | NSString | 是不是是自己 |
extern NSString * const TALKFUN_EVENT_RTC_KICK; 踢下讲台
[self.talkfunSDK on:TALKFUN_EVENT_RTC_KICK callback:^(id result) {
}];
extern NSString * const TALKFUN_EVENT_RTC_DOWN; 有人主动下讲台
[self.talkfunSDK on:TALKFUN_EVENT_RTC_DOWN callback:^(id result) {
}];
extern NSString * const TALKFUN_EVENT_RTC_OPEN_VIDEO; 打开摄像头
[self.talkfunSDK on:TALKFUN_EVENT_RTC_OPEN_VIDEO callback:^(id result) {
}];
extern NSString * const TALKFUN_EVENT_RTC_CLOSE_VIDEO; 关闭摄像头
[self.talkfunSDK on: TALKFUN_EVENT_RTC_CLOSE_VIDEO callback:^(id result) {
}];
extern NSString * const TALKFUN_EVENT_RTC_OPEN_AUDIO; 打开麦克风
[self.talkfunSDK on:TALKFUN_EVENT_RTC_OPEN_AUDIO callback:^(id result) {
}];
extern NSString * const TALKFUN_EVENT_RTC_CLOSE_AUDIO; 关闭麦克风
[self.talkfunSDK on:TALKFUN_EVENT_RTC_CLOSE_AUDIO callback:^(id result) {
}];
extern NSString * const TALKFUN_EVENT_RTC_DRAW_ENABLE; 打开画线权限
[self.talkfunSDK on: TALKFUN_EVENT_RTC_DRAW_ENABLE callback:^(id result) {
}];
extern NSString * const TALKFUN_EVENT_RTC_DRAW_DISABLE; 关闭画线权限
[self.talkfunSDK on: TALKFUN_EVENT_RTC_DRAW_DISABLE callback:^(id result) {
}];
extern NSString * const TALKFUN_EVENT_RTC_OFFLINE ; 用户离线
[self.talkfunSDK on:TALKFUN_EVENT_RTC_OFFLINE callback:^(id result) {
}];
申请上讲台
(void)apply:(void (^)(NSDictionary* result))callback;
[weakSelf.talkfunSDK.platformManager apply:^(NSDictionary* result) { }];
取消上讲台申请
- (void)cancel:(void (^)(NSDictionary* result))callback;
[weakSelf.talkfunSDK.platformManager cancel:^(NSDictionary* result) {
}];
主动下讲台
(void)down:(void (^)(NSDictionary* result))callback;
[weakSelf.talkfunSDK.platformManager down:^(NSDictionary* result) { }];
打开摄像头
(void)openVideo:(void (^)(NSDictionary* result))callback;
[self.talkfunSDK.platformManager openVideo:^(NSDictionary *result) {
}];
关闭摄像头
(void)closeVideo:(void (^)(NSDictionary* result))callback;
[self.talkfunSDK.platformManager closeVideo:^(NSDictionary *result) }];
打开麦克风
(void)openAudio:(void (^)(NSDictionary* result))callback;
[self.talkfunSDK.platformManager openAudio:^(id result) { }];
关闭麦克风
(void)closeAudio:(void (^)(NSDictionary* result))callback;
[self.talkfunSDK.platformManager closeAudio:^(id result) { }];
```