Classes
The following classes are available globally.
-
Declaration
Objective-C
@interface PLVBeautyManager : NSObject
Swift
class PLVBeautyManager : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVCustomMessage : NSObject @property (nonatomic, copy) NSString * _Nullable msgId; @property (nonatomic, copy) NSString *tip; @property (nonatomic, copy) NSString *event; @property (nonatomic, strong) NSDictionary *data; @property (nonatomic, assign) int emitMode; @end
Swift
class PLVCustomMessage : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVFileMessage : NSObject @property (nonatomic, copy) NSString * _Nullable msgId; @property (nonatomic, assign) NSTimeInterval time; @property (nonatomic, assign) NSTimeInterval playbackTime;// 聊天回放不知道这次要不要支持先放在这里 /// 如果值为"extend"表示为:提醒消息 @property (nonatomic, copy) NSString * _Nullable source; @property (nonatomic, copy) NSString *url; @property (nonatomic, copy) NSString *name; @end
Swift
class PLVFileMessage : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVImageEmotionMessage : NSObject @property (nonatomic, copy) NSString * _Nullable msgId; @property (nonatomic, copy) NSString *imageId; @property (nonatomic, copy) NSString *imageName; @property (nonatomic, copy) NSString * _Nullable imageUrl; @property (nonatomic, assign) CGSize imageSize; @property (nonatomic, assign) NSTimeInterval time; @property (nonatomic, assign) NSTimeInterval playbackTime; ///图片表情消息的发送状态 @property (nonatomic, assign) PLVImageEmotionMessageSendState sendState; @end
Swift
class PLVImageEmotionMessage : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVImageMessage : NSObject @property (nonatomic, copy) NSString * _Nullable msgId; @property (nonatomic, copy) NSString *imageId; @property (nonatomic, copy) NSString *imageName; @property (nonatomic, copy) NSString * _Nullable imageUrl; @property (nonatomic, strong) UIImage * _Nullable image; // 发送图片消息时,如果processImageData不为空,优先使用该属性进行上传 // @note 使用processImageData上传的图片,SDK内部不会再做任何数据压缩 @property (nonatomic, strong) NSData * _Nullable processImageData; @property (nonatomic, assign) CGSize imageSize; @property (nonatomic, assign) float uploadProgress; @property (nonatomic, assign) PLVImageUploadState uploadState; @property (nonatomic, assign) PLVImageMessageSendState sendState; @property (nonatomic, assign)NSTimeInterval time; @property (nonatomic, assign) NSTimeInterval playbackTime; /// 如果值为"extend"表示为:提醒消息 @property (nonatomic, copy) NSString * _Nullable source; @end
Swift
class PLVImageMessage : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVPlaybackMessage : NSObject // 视频时间戳,单位毫秒 @property (nonatomic, assign) NSTimeInterval playbackTime; // 发送消息用户 @property (nonatomic, strong) PLVPlaybackMsgUser *user; // 可能是PLVSpeakMessage、PLVQuoteMessage、PLVImageMessage、PLVImageEmotionMessage、PLVSpeakTopMessage @property (nonatomic, strong) id message; /// 解析后台接口返回数据 - (instancetype)initWithDictionary:(NSDictionary *)dictionary; /// message属性是否是PLVSpeakMessage、PLVQuoteMessage、PLVImageMessage、PLVImageEmotionMessage、PLVSpeakTopMessage五种消息类型之一 + (BOOL)playbackMessageValid:(PLVPlaybackMessage *)playbackMessage; @end
Swift
class PLVPlaybackMessage : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVPlaybackMsgUser : NSObject /// 用户头衔 @property (nonatomic, copy) NSString *actor; /// 用户角色字符串 @property (nonatomic, copy) NSString *role; /// 用户Id @property (nonatomic, copy) NSString *userId; /// 用户昵称 @property (nonatomic, copy) NSString *userName; /// 用户头像地址 @property (nonatomic, copy) NSString *avatarUrl; /// 解析后台接口返回数据 - (instancetype)initWithDictionary:(NSDictionary *)dictionary; @end
Swift
class PLVPlaybackMsgUser : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVQuoteMessage : NSObject @property (nonatomic, copy) NSString * _Nullable msgId; @property (nonatomic, copy) NSString *content; @property (nonatomic, copy) NSString *quoteMsgId; @property (nonatomic, copy) NSString *quoteUserId; @property (nonatomic, copy) NSString *quoteUserName; @property (nonatomic, copy) NSString * _Nullable quoteContent; @property (nonatomic, copy) NSString * _Nullable quoteImageUrl; @property (nonatomic, assign) CGSize quoteImageSize; @property (nonatomic, assign)NSTimeInterval time; @property (nonatomic, assign) NSTimeInterval playbackTime; /// 消息是否超过约定长度 @property (nonatomic, assign) BOOL overLen; /// 是否触发严禁词,且content中的严禁词已被**替换,默认为NO @property (nonatomic, assign) BOOL prohibitWordReplaced; @end
Swift
class PLVQuoteMessage : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVRedpackMessage : NSObject // 消息ID @property (nonatomic, copy) NSString * _Nullable msgId; // 红包ID @property (nonatomic, copy) NSString * _Nullable redpackId; // 红包存量ID @property (nonatomic, copy) NSString * _Nullable redCacheId; // 红包祝福语 @property (nonatomic, copy) NSString *content; // 红包消息时间戳 @property (nonatomic, assign) NSTimeInterval time; // 红包类型 @property (nonatomic, assign) PLVRedpackMessageType type; // 红包状态 @property (nonatomic, assign) PLVRedpackState state; // 红包数量 @property (nonatomic, assign) NSInteger number; // 红包总金额 @property (nonatomic, assign) float totalAmount; // 红包类型type字符串 @property (nonatomic, copy, readonly) NSString *typeString; @end
Swift
class PLVRedpackMessage : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVRewardMessage : NSObject /// 消息Id /// @note 从接口拉取不为空,从即时消息收取为nil @property (nonatomic, copy) NSString * _Nullable msgId; /// 打赏的用户 @property (nonatomic, copy) NSString *unick; /// 打赏的数量 @property (nonatomic, copy) NSString *goodNum; /// 打赏内容:礼物打赏为礼物名称,现金打赏为金额 @property (nonatomic, copy) NSString *rewardContent; /// 礼物打赏为礼物图片,现金打赏为空, 使用本地图片 @property (nonatomic, copy) NSString * _Nullable gimg; @property (nonatomic, strong) UIImage *image; @end
Swift
class PLVRewardMessage : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVSpeakMessage : NSObject @property (nonatomic, copy) NSString * _Nullable msgId; @property (nonatomic, copy) NSString *content; @property (nonatomic, assign) NSTimeInterval time; @property (nonatomic, assign) NSTimeInterval playbackTime; /// 如果值为"extend"表示为:提醒消息 @property (nonatomic, copy) NSString * _Nullable source; /// 消息是否超过约定长度 @property (nonatomic, assign) BOOL overLen; /// 是否触发严禁词,且content中的严禁词已被**替换,默认为NO @property (nonatomic, assign) BOOL prohibitWordReplaced; @end
Swift
class PLVSpeakMessage : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVSpeakTopMessage : NSObject @property (nonatomic, copy) NSString * _Nullable msgId; /// 上墙内容 @property (nonatomic, copy) NSString *content; @property (nonatomic, assign) NSTimeInterval time; @property (nonatomic, assign) NSTimeInterval relativeTime; /// 上墙用户昵称 @property (nonatomic, copy) NSString *nick; /// 上墙用户头像 @property (nonatomic, copy) NSString *pic; /// 操作上墙的头衔 @property (nonatomic, copy) NSString *topActor; /// top 上墙 cancelTop下墙 @property (nonatomic, copy) NSString *action; /// 其他上墙内容 @property (nonatomic, strong) NSArray *others; /// 解析数据 - (instancetype)initWithDictionary:(NSDictionary *)dictionary; - (NSDictionary *)toDictionary; @end
Swift
class PLVSpeakTopMessage : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVChatroomManager : NSObject /// 委托代理 @property (nonatomic, weak) id<PLVChatroomManagerProtocol> delegate; /// 当前场次ID,需在Demo层进行设置,并监听数据变化实时更新 @property (nonatomic, copy) NSString * _Nullable sessionId; /// 当前登录用户是否是特殊身份(譬如讲师),默认为NO,为YES时字段banned永远为NO @property (nonatomic, assign) BOOL specialRole; /// socket处于已连接且登录成功的状态时为YES,默认为NO @property (nonatomic, assign, readonly) BOOL online; /// 聊天室是否被关闭,默认为NO @property (nonatomic, assign, readonly) BOOL closeRoom; /// 当前登录用户是否被禁言,默认为NO @property (nonatomic, assign, readonly) BOOL banned; /// 单例方法 + (instancetype)sharedManager; /// 发送提问消息 /// @param content 提问的文本内容 /// @return 发送结果,成功为YES,失败为NO - (BOOL)sendQuesstionMessage:(NSString *)content; /// 发送自定义消息 /// @param message 自定义消息数据模型 /// @return 发送结果,成功为YES,失败为NO - (BOOL)sendCustonMessage:(PLVCustomMessage *)message; /// 发送自定义消息 /// @param message 自定义消息数据模型 /// @param joinHistoryList 是否加入历史聊天记录,加入为YES,不加入为NO /// @return 发送结果,成功为YES,失败为NO - (BOOL)sendCustonMessage:(PLVCustomMessage *)message joinHistoryList:(BOOL)joinHistoryList; /// 发送文本消息,默认不需要回调msgId /// @param message 文本消息数据模型 /// @return 发送结果,成功为YES,失败为NO - (BOOL)sendSpeakMessage:(PLVSpeakMessage *)message; /// 发送文本消息,发送成功执行callback /// @param message 文本消息数据模型 /// @param callback 回调 /// @return 发送结果,成功为YES,失败为NO - (BOOL)sendSpeakMessage:(PLVSpeakMessage *)message callback:(void (^ _Nullable)(NSString *msgId))callback; /// 发送回复消息 /// @param message 回复消息数据模型 /// @return 发送结果,成功为YES,失败为NO - (BOOL)sendQuoteMessage:(PLVQuoteMessage *)message; /// 发送回复消息,发送成功执行callback /// @param message 回复消息数据模型 /// @param callback 回调 /// @return 发送结果,成功为YES,失败为NO - (BOOL)sendQuoteMessage:(PLVQuoteMessage *)message callback:(void (^ _Nullable)(NSString *msgId))callback; /// 发送图片消息 /// 发送结果通过delegate通知 /// @param message 图片消息数据模型 /// @note 如果使用message.processImageData进行上传,数据不允许大于2mb - (void)sendImageMessage:(PLVImageMessage *)message; /// 发送图片表情消息 /// @param message 图片表情消息数据模型 根据sendState状态判断发送结果 - (BOOL)sendImageEmotionMessage:(PLVImageEmotionMessage *)message; /// 发送点赞,新增点赞次数为1 /// 调用该方法之后,内部会进行数据累计,每5s发送一次socket消息,以及发送一次http统计 - (void)sendLikeEvent; /// 发送点赞 /// 调用该方法之后,内部会进行数据累计,每5s发送一次socket消息,以及发送一次http统计 /// @param count 新增点赞次数 - (void)sendLikeEvent:(NSInteger)count; /// 发送禁言消息,讲师端专用接口 /// @param banned YES-禁言 NO-取消禁言 /// @param userId 被禁言/取消禁言的用户ID - (BOOL)sendBandMessage:(BOOL)banned bannedUserId:(NSString *)userId; /// 发送踢人消息,讲师端专用接口 /// @param userId 被踢出的用户ID - (BOOL)sendKickMessageWithUserId:(NSString *)userId; /// 发送取消踢出(移入)消息,讲师端专用接口 /// @param userId 被移入的用户ID - (BOOL)sendUnkickMessageWithUserId:(NSString *)userId; /// 发送全体禁言、解禁消息,讲师端专用接口 /// @param closeRoom YES:全体禁言;NO:全体解禁 - (BOOL)sendCloseRoom:(BOOL)closeRoom; /// 发送回复消息,发送成功执行callback /// @param nickname 修改后昵称 /// @return 发送结果,成功为YES,失败为NO - (BOOL)sendChangeNickname:(NSString *)nickname; /// 发送上墙/下墙消息 /// @param msgId 需要上墙/下墙消息的id /// @param toTop YES:上墙;NO:下墙 /// @return 发送结果,成功为YES,失败为NO - (BOOL)sendPinMessageWithMsgId:(NSString *_Nullable)msgId toTop:(BOOL)toTop; /// 开启管理器 /// @param delegate 用于设置代理,监听socket消息等 - (void)setupWithDelegate:(id<PLVChatroomManagerProtocol>)delegate channelId:(NSString *)channelId; /// 消息overLen字段为YES时,使用该方法获取超长消息 /// @return YES-消息发出;NO-消息未发出,即callback不会执行 - (BOOL)overLengthSpeakMessageWithMsgId:(NSString *)msgId callback:(void (^)(NSString * _Nullable content))callback; /// 退出前调用,用于资源释放、状态位清零 - (void)destroy; @end
Swift
class PLVChatroomManager : NSObject
-
聊天重放消息管理器
See moreDeclaration
Objective-C
@interface PLVPlaybackMessageManager : NSObject
Swift
class PLVPlaybackMessageManager : NSObject
-
频道上下课状态管理器
See moreDeclaration
Objective-C
@interface PLVChannelClassManager : NSObject
Swift
class PLVChannelClassManager : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVHiClassManager : NSObject #pragma mark - [ 属性 ] #pragma mark 可配置项 @property (nonatomic, weak) id<PLVHiClassManagerDelegate> delegate; #pragma mark 数据 /// 课节相关 /// 课程码,默认为nil,仅在学生端使用课程码登录时,不为空 @property (nonatomic, copy, readonly) NSString * _Nullable courseCode; /// 课节ID @property (nonatomic, copy, readonly) NSString *lessonId; /// 课节状态枚举值 @property (nonatomic, assign, readonly) PLVHiClassStatus status; /// 上课时长(单位秒),status不为PLVHiClassStatusInClass时,duration为0 @property (nonatomic, assign, readonly) NSInteger duration; /// 实际上课时间(时间戳),未上课时为0 @property (nonatomic, assign, readonly) NSInteger classTime; /// 原定上课时间(时间戳),不为0 @property (nonatomic, assign, readonly) NSInteger lessonStartTime; /// 原定下课时间(时间戳),不为0 @property (nonatomic, assign, readonly) NSInteger lessonEndTime; /// 分组相关 /// 当前用户所处分组状态,默认为PLVHiClassGroupStateNotInGroup @property (nonatomic, assign, readonly) PLVHiClassGroupState groupState; /// 当前用户是否为分组组长,默认为NO @property (nonatomic, assign, readonly) BOOL currentUserIsGroupLeader; /// 讲师是否在当前分组中,默认为NO @property (nonatomic, assign, readonly) BOOL teacherInGroup; /// 当前用户所在分组ID @property (nonatomic, copy, readonly) NSString *groupId; /// 当前用户所在分组名 @property (nonatomic, copy, readonly) NSString *groupName; /// 当前用户所在分组组长ID @property (nonatomic, copy, readonly) NSString *groupLeaderId; /// 当前用户所在分组组长昵称 @property (nonatomic, copy, readonly) NSString *groupLeaderName; #pragma mark - [ 方法 ] /// 单例方法 + (instancetype)sharedManager; /// 进入课室之前,获取到课节详情时,配置基本数据 /// @param detailDict 课节详情接口返回数据 /// @param courseCode 学生登录用的课程码,如果非学生端,以及非课程码登录,设为nil - (void)setupWithLessonDetail:(NSDictionary *)detailDict courseCode:(NSString * _Nullable)courseCode; /// 退出课室时,用于销毁计时器、复位数据、撤除socket消息监听 - (void)clear; /// 进入课室时,用于设置socket消息监听、设置定时器 - (void)enterClassroom; #pragma mark 讲师专用方法 /// 调用http接口跟socket消息,修改课节状态为上课中 - (void)startClass; /// 调用http接口跟socket消息,修改课节状态为已下课 - (void)finishClass; #pragma mark 学生专用方法 /// 请求课节列表获取是否有下一节课的权限,以及课节结束信息 /// @param completion 请求结束执行的代码块,如果请求失败或者无权限,lessonDict为nil,duration为0时表示请求课节结束信息失败 - (void)requestWatcherNextLessonInfoWithCompletion:(void(^)(NSDictionary *lessonDict, NSInteger duration))completion; /// 组长请求帮助 - (BOOL)requestHelp; /// 组长取消请求帮助 - (BOOL)cancelRequestHelp; @end
Swift
class PLVHiClassManager : NSObject
-
下载管理器(单例类)
See moreDeclaration
Objective-C
@interface PLVDownloadManager : NSObject
Swift
class PLVDownloadManager : NSObject
-
数据库管理器(单例类;特定业务的属性、方法声明,在对应业务扩展文件中)
See moreDeclaration
Objective-C
@interface PLVDownloadDatabaseManager : NSObject
Swift
class PLVDownloadDatabaseManager : NSObject
-
云课堂 下载回放任务信息模型
See moreDeclaration
Objective-C
@interface PLVDownloadPlaybackTaskInfo : PLVDownloadTaskInfo
Swift
class PLVDownloadPlaybackTaskInfo : PLVDownloadTaskInfo
-
下载任务信息模型,描述一个下载任务
See moreDeclaration
Objective-C
@interface PLVDownloadTaskInfo : NSObject
Swift
class PLVDownloadTaskInfo : NSObject
-
下载路径管理器(单例类)
See moreDeclaration
Objective-C
@interface PLVDownloadPathManager : NSObject
Swift
class PLVDownloadPathManager : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVWErrorManager : NSObject /// 用来自定义错误码描述的 delegate /// 注意:该 delegate 是单代理,不是多代理 @property (nonatomic, weak) NSObject<PLVWErrorManagerProtocol> *delegate; + (instancetype)sharedManager; - (NSError *)errorWithModul:(PLVFErrorCodeModul)modul code:(NSInteger)code; @end
Swift
class PLVWErrorManager : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVInteractBaseApp : NSObject @property (nonatomic, weak) id <PLVInteractBaseAppDelegate> delegate; @property (nonatomic, weak) PLVJSBridge * jsBridge; @property (nonatomic, assign) float triviaCardTimeoutSec; /// 互动应用提交超时秒数 @property (nonatomic, assign) NSInteger triviaCardMaxRetryCount;/// 互动应用最大重试提交次数 - (instancetype)initWithJsBridge:(PLVJSBridge *)jsBridge; - (void)processInteractMessageString:(NSString *)msgString jsonDict:(NSDictionary *)jsonDict; - (void)callRequirePortraitScreen; - (void)callWebviewShow; - (void)submitResultCallback:(NSString *)json event:(NSString *)event; - (void)submitResultTimeoutCallback:(NSString *)event; @end
Swift
class PLVInteractBaseApp : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVInteractWebview : NSObject @property (nonatomic, weak) id <PLVInteractWebviewDelegate> delegate; @property (nonatomic, strong, readonly) PLVJSBridge * jsBridge; @property (nonatomic, strong, readonly) WKWebView * webview; @end
Swift
class PLVInteractWebview : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVContainerWebViewBridge : PLVSocketWebViewBridge
Swift
class PLVContainerWebViewBridge : PLVSocketWebViewBridge
-
互动模块 WebSDK 与 JS 的桥接,用于互动 WebSDK webView与JS交互
See moreDeclaration
Objective-C
@interface PLVInteractWebViewBridge : PLVSocketWebViewBridge
Swift
class PLVInteractWebViewBridge : PLVSocketWebViewBridge
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVLoginWebViewBridge : NSObject @property (nonatomic, weak) id<PLVLoginWebViewBridgeDelegate> delegate; @property (nonatomic, strong, readonly) WKWebView *webView; @property (nonatomic, strong, readonly) PLVFWKWebViewJavascriptBridge *bridge; /// 初始化方法 /// @param webView webview对象 /// @param webViewDelegate webview代理 - (instancetype)initBridgeWithWebView:(WKWebView *)webView webViewDelegate:(id<WKNavigationDelegate>)webViewDelegate; @end
Swift
class PLVLoginWebViewBridge : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVProductWebViewBridge : PLVSocketWebViewBridge
Swift
class PLVProductWebViewBridge
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVQAWebViewBridge : PLVSocketWebViewBridge
Swift
class PLVQAWebViewBridge
-
负责处理 socket 事件的 bridge
See moreDeclaration
Objective-C
@interface PLVSocketWebViewBridge : NSObject
Swift
class PLVSocketWebViewBridge : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVStreamerCommodityWebViewBridge : PLVSocketWebViewBridge
Swift
class PLVStreamerCommodityWebViewBridge
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVStreamerInteractWebViewBridge : PLVSocketWebViewBridge
Swift
class PLVStreamerInteractWebViewBridge
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVTuWenWebViewBridge : PLVSocketWebViewBridge
Swift
class PLVTuWenWebViewBridge
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVWebViewBridge : NSObject @property (nonatomic, weak) id<PLVWebViewBridgeProtocol> delegate; + (instancetype)bridgeWithWebview:(WKWebView *)webView webviewDelegate:(id<WKNavigationDelegate>)webViewDelegate; + (instancetype)bridgeWithWebview:(WKWebView *)webView; - (void)setWebViewDelegate:(id<WKNavigationDelegate> __nullable)webViewDelegate; #pragma mark - Call JS Method /// 设置用户信息 /// @param userDict socket 用户登录信息 - (void)setUserInfo:(NSDictionary *)userDict; /// 白板、PPT内部翻页 /// @note 区别'changePPTWithAutoId:pageNumber:',不可用于白板与PPT之间的切换,或打开新的白板或PPT /// @param type 翻页类型 - (void)changePPTPageWithType:(PLVChangePPTPageType)type; #pragma mark 观看专用方法 /// 刷新PPT内容 /// @param jsonObject PPT内容 /// @param delay 延迟时间 (单位毫秒) - (void)refreshPPTWithJsonObject:(NSDictionary *)jsonObject delay:(NSUInteger)delay; /// 【观看回放时】设置本地ppt路径 /// @param path ppt路径 - (void)pptSetLocalPath:(NSString *)path; - (void)pptLocalStartWithVideoId:(NSString *)videoId vid:(NSString *)vid; /// 设置视频SEI信息 /// @param newTimeStamp 时间戳信息 - (void)setSEIData:(long)newTimeStamp; /// 加载回放PPT /// @param vid 回放视频的vid - (void)pptStartWithVid:(NSString *)vid DEPRECATED_MSG_ATTRIBUTE("已废弃,请使用pptStartWithVideoId:roomId:"); /// 【观看回放时】加载回放PPT /// @param videoId 回放视频的videoId(请求'直播回放视频的信息'接口返回的视频Id,与后台回放列表看到的vid不是同一个数据) /// @param channelId 频道Id - (void)pptStartWithVideoId:(NSString *)videoId channelId:(NSString *)channelId; /// 【观看暂存时】加载暂存PPT /// @param fileId 暂存视频的fileId /// @param channelId 频道Id - (void)pptStartWithFileId:(NSString *)fileId channelId:(NSString *)channelId; #pragma mark 推流专用方法 /// 设置或取消画笔权限 /// @param userType 用户权限, speaker 代表控制ppt权限+画笔权限 - (void)setPaintPermission:(NSString *)userType; /// 设置画板是否处于可绘制状态 /// @param open 打开或关闭画板 - (void)setPaintStatus:(BOOL)open; /// 告诉 h5 现在开始上课,h5 会清空画板 /// @param jsonDict 开始推流时发送的 socket 消息 - (void)setSliceStart:(id)jsonDict; /// 切换 ppt 或白板 /// 如果切换的是文档,切换成功后触发回调 '-jsbridge_documentChangeWithAutoId:imageUrls:fileName:' /// @param autoId 切换的文档的 autoId,如果是白板 autoId 为 0 /// @param pageNumber 切换到文档的第几页,-1 表示打开上次展示的页面 - (void)changePPTWithAutoId:(NSUInteger)autoId pageNumber:(NSInteger)pageNumber; /// 设置画笔类型 /// @param type line - 自由笔;text - 文字;arrowLine - 箭头 - (void)setDrawType:(PLVWebViewBrushPenType)type; /// 修改画笔颜色 /// @param hexString RGB色值,如红色为“#FF0000” - (void)changeColor:(NSString *)hexString; /// 执行撤回画板操作 - (void)doUndo; /// 进入画笔删除状态 - (void)toDelete; /// 删除所有画笔 - (void)deleteAllPaint; /// 完成文本输入 - (void)changeTextContent:(NSString *)content; /// 重置 白板或PPT 缩放比例为 100% - (void)resetWhiteboardPPTZoomRatio; #pragma mark - Register JS Method /// 注册 'sendSocketEvent' 方法 /// 用于把 h5 接收到的操作画板产生的数据,通过 socket 发送给聊天室 /// 用于开播场景时,开始推流才需要发送 h5 画板数据到聊天室 /// 配合回调 '-jsbridge_sendSocketEventWithJson:' 使用 - (void)registerSocketEventFunction; #pragma mark 观看专用方法 /// 注册 'pptPrepare' 方法 /// 【回放时】用于PPT视图准备完毕时接收到通知 /// 配合回调 '-jsbridge_PPTHadPrepare' 使用 - (void)registerPPTPrepareFunction; /// 注册 'videoDuration' 方法 /// 用于PPT视图需要获取视频回放播放器当前播放时间点时接收到通知 /// 配合回调 '-jsbridge_getCurrentPlaybackTime' 使用 - (void)registerVideoDurationFunction; /// 注册 'changePPTPosition' 方法 /// 用于讲师发起PPT位置切换时接收到通知 /// 配合回调 '-jsbridge_changePPTPosition:' 使用 - (void)registerChangePPTPositionFunction; /// 注册 'pptStatusChange' 方法 /// @note 用于观看端文档翻页时接收到通知 /// 配合回调 '-jsbridge_pageStatusChangeWithAutoId:pageNumber:totalPage:pptStep:maxNextNumber:' 使用 - (void)registerWatchPPTStatusChangeFunction; #pragma mark 推流专用方法 /// 注册 'pptStatusChange' 方法 /// 用于文档翻页时接收到通知 /// 配合回调 '-jsbridge_pageStatusChangeWithAutoId:pageNumber:totalPage:pptStep:' 使用 - (void)registerPPTStatusChangeFunction; /// 注册 'toEditText' 方法 /// 用于 webView 上准备输入文字时调用 /// 配合回调 '-jsbridge_documentInputWithText:textColor:' 使用 - (void)registerPPTInputFunction; /// 注册 'whiteImages' 方法 /// 用于 webView 上白板预览图更新时调用 /// 配合回调 '-jsbridge_updateWhiteboardImageData:pageNumber:' 使用 - (void)registerWhiteImagesFunction; /// 注册 'pptThumbnail'方法(续播后,需要同步该ppt的缩略图和文件名称) /// 用于 恢复上场直播后 同步ppt缩略图 /// 配合回调 '-jsbridge_documentChangeWithAutoId:imageUrls:fileName:' 使用 - (void)registerPPTThumbnailFunction; /// 注册 'zoomChange' 方法 /// 用于 webView 上白板或PPT尺寸缩放更新时调用 /// 配合回调 '-jsbridge_updateWhiteboardPPTZoomRatio:' 使用 - (void)registerWhiteboardPPTZoomChangeFunction; /// 注销 'pptThumbnail'方法 - (void)removePPTThumbnailFunction; @end
Swift
class PLVWebViewBridge : NSObject
-
Declaration
Objective-C
@interface PLVConsoleLogger
Swift
class PLVConsoleLogger
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVLoganManager : NSObject @property (nonatomic, weak) id <PLVLoganManagerDelegate> delegate; /// 是否禁用日志本地记录功能,默认为NO——启用日志本地记录,YES——禁用日志本地记录 @property (nonatomic, assign) BOOL logDisable; /// 是否禁用日志上报功能,默认为NO——启用日志上报,YES——禁用日志上报 @property (nonatomic, assign) BOOL logUploadDisable; + (instancetype)sharedManager; /// 检查是否存在上报任务 - (void)checkAndReportIfNeed; @end
Swift
class PLVLoganManager : NSObject
-
ViewLog 统计后台用户自定义参数
See moreDeclaration
Objective-C
@interface PLVViewLogCustomParam : NSObject
Swift
class PLVViewLogCustomParam : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVWLogReporterManager : NSObject + (instancetype)sharedManager; /** 云课堂直播间登录时调用 */ - (void)registerReporterWithChannelId:(NSString *)channelId appId:(NSString *)appId appSecret:(NSString *)appSecret userId:(NSString *)userId DEPRECATED_MSG_ATTRIBUTE("已废弃,请使用registerReporterWithChannelId:userId:"); /** 云课堂直播间登录时调用 @note elog track 日志需要相关信息 */ - (void)registerReporterWithChannelId:(NSString *)channelId userId:(NSString *)userId; /** 云课堂回放登录时调用 */ - (void)registerReporterWithChannelId:(NSString *)channelId appId:(NSString *)appId appSecret:(NSString *)appSecret userId:(NSString *)userId vId:(NSString *)vId DEPRECATED_MSG_ATTRIBUTE("已废弃,请使用registerReporterWithChannelId:userId:vId:"); /** 云课堂回放登录时调用 @note elog track 日志需要相关信息 */ - (void)registerReporterWithChannelId:(NSString *)channelId userId:(NSString *)userId vId:(NSString *)vId; /** 手机开播、互动学堂登录时调用 @note 仅在productType为PLVProductTypeStreamer或PLVProductTypeHiClass时生效 @note elog 日志需要相关信息 */ - (void)registerReporterWithChannelId:(NSString *)channelId productType:(PLVFLogProductType)productType; /** 云课堂直播/回放退出登录时调用 */ - (void)clear; #pragma mark - ELog /** Elog 上报器错误日志上报接口 1 */ - (void)reportWithErrorCode:(NSInteger)errorCode information:(id __nullable)information; /** Elog 事件上报便利接口 1 */ - (void)reportWithEvent:(NSString *)event modul:(NSString *)modul informationType:(NSString * __nullable)type informationData:(id __nullable)data; /** Elog 事件上报便利接口 2 */ - (void)reportWithEvent:(NSString *)event modul:(NSString *)modul information:(id __nullable)information; /** Elog 事件上报便利接口 1 - 批量上报 */ - (void)reportWithEvent:(NSString *)event modul:(NSString *)modul informationType:(NSString * __nullable)type informationData:(id __nullable)data patch:(BOOL)patch; /** Elog 事件上报便利接口 2 - 批量上报 */ - (void)reportWithEvent:(NSString *)event modul:(NSString *)modul information:(id __nullable)information patch:(BOOL)patch; #pragma mark - View Log /** 直播播放信息统计:用于直播、回放时 @param param 统计后台用户自定义参数配置类 @param playerId 播放器ID */ - (void)reportLiveViewLogWithParam:(PLVViewLogCustomParam *)param playerId:(NSString *)playerId logModelConfigBlock:(PLVFViewLogModel *(^)(void))configBlock; /** 点播播放信息统计:用于播放点播视频时 @param param 统计后台用户自定义参数配置类 @param playerId 播放器ID */ - (void)reportVodViewLogWithParam:(PLVViewLogCustomParam *)param playerId:(NSString *)playerId logModelConfigBlock:(PLVFViewLogModel *(^)(void))configBlock; #pragma mark - Qos /** 服务质量统计 */ /** 直播首次加载时长 @param channel 频道信息 @param time 首次加载时长 @param time_player 首次加载播放器起播时长 @param time_business 首次加载播放器业务流程时长 @param playerId 播放器ID */ - (void)reportLiveLoadingQosWithChannel:(PLVChannelInfoModel *)channel time:(int)time time_player:(int)time_player time_business:(int)time_business playerId:(NSString *)playerId; /** 回放首次加载时长 @param channel 频道信息 @param time 首次加载时长 @param time_player 首次加载播放器起播时长 @param time_business 首次加载播放器业务流程时长 @param playerId 播放器ID @param vid 视频vid */ - (void)reportVodLoadingQosWithChannel:(PLVChannelInfoModel *)channel time:(int)time time_player:(int)time_player time_business:(int)time_business playerId:(NSString *)playerId vid:(NSString *)vid; /** 直播二次缓冲时长 @param channel 频道信息 @param time 二次缓冲时长 @param playerId 播放器ID */ - (void)reportLiveBufferQosWithChannel:(PLVChannelInfoModel *)channel time:(int)time playerId:(NSString *)playerId; /** 回放二次缓冲时长 @param channel 频道信息 @param time 二次缓冲时长 @param playerId 播放器ID @param vid 视频vid */ - (void)reportVodBufferQosWithChannel:(PLVChannelInfoModel *)channel time:(int)time playerId:(NSString *)playerId vid:(NSString *)vid; /** 直播卡顿 @param channel 频道信息 @param time 卡顿时长 @param playerId 播放器ID */ - (void)reportLiveStallingQosWithChannel:(PLVChannelInfoModel *)channel time:(int)time playerId:(NSString *)playerId; /** 直播播放出错 @param channel 频道信息 @param uri 请求资源的URI @param status 服务器响应的状态码 @param errorcode 错误代码 @param errormsg 错误内容描述 @param playerId 播放器ID */ - (void)reportLiveErrorQosWithChannel:(PLVChannelInfoModel *)channel uri:(NSString *)uri status:(NSString *)status errorcode:(NSString *)errorcode errormsg:(NSString *)errormsg playerId:(NSString *)playerId; /** 回放播放出错 @param channel 频道信息 @param uri 请求资源的URI @param status 服务器响应的状态码 @param errorcode 错误代码 @param errormsg 错误内容描述 @param playerId 播放器ID @param vid 视频vid */ - (void)reportVodErrorQosWithChannel:(PLVChannelInfoModel *)channel uri:(NSString *)uri status:(NSString *)status errorcode:(NSString *)errorcode errormsg:(NSString *)errormsg playerId:(NSString *)playerId vid:(NSString *)vid; #pragma mark - track Log /// 开启/关闭 track 日志打点 - (void)enableTrackEventReport:(BOOL)enable; /// track 体系日志配置viewerId、viewerName、用户角色 - (void)setupViewerId:(NSString *)viewerId viewerName:(NSString *)viewerName role:(NSString *)role; /// track 体系日志配置场次ID - (void)setupSessionId:(NSString *)sessionId; /// track 体系日志上报 /// - Parameters: /// - eventId: 事件id,用于区分不同事件 /// - eventType: 事件类型,如click、show /// - specInformation: 事件专有属性 - (void)reportTrackWithEventId:(NSString *)eventId eventType:(NSString *)eventType specInformation:(NSDictionary *)specInformation; /// track 体系日志上报 /// - Parameters: /// - eventId: 事件id,用于区分不同事件 /// - eventType: 事件类型,如click、show /// - specInformation: 事件专有属性数组 - (void)reportTrackWithEventId:(NSString *)eventId eventType:(NSString *)eventType specInformationArray:(NSArray *)specInformationArray; @end
Swift
class PLVWLogReporterManager : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVLiveVClassAPI : NSObject /// 讲师登录接口返回的token,登出时置nil /// @note 一般在内部进行配置,仅当讲师端缓存有Token时会在外部直接设置 @property (class, nonatomic, strong) NSString * _Nullable teachToken; /// 学生登录接口返回的token,登出时置nil /// @note 仅在内部进行配置 @property (class, nonatomic, strong, readonly) NSString * _Nullable watchToken; /// 获取课程或课节简单信息 /// @param courseCode 课程号 /// @param lessonId 课节ID /// @param successHandler 登录成功时,触发该block /// @param failureHandler 登录失败时,触发该block + (void)courseOrLessonSimpleInfoWithCourseCode:(NSString * _Nullable)courseCode lessonId:(NSString * _Nullable)lessonId success:(void (^)(NSDictionary *responseDict))successHandler failure:(void (^ _Nullable)(NSError *error))failureHandler; /// 获取课节结束信息 /// @param lessonId 课节ID /// @param isTeach 是否是讲师端获取 /// @param successHandler 登录成功时,触发该block /// @param failureHandler 登录失败时,触发该block + (void)lessonFinishInfoWithLessonId:(NSString *)lessonId isTeach:(BOOL)isTeach success:(void (^)(NSDictionary *responseDict))successHandler failure:(void (^ _Nullable)(NSError *error))failureHandler; @end
Swift
class PLVLiveVClassAPI : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVLiveVideoAPI : NSObject /** 设置私有的聊天室域名 @param domainName 外部设置的私有域名,如果为空或没有设置,怎使用默认的域名 */ + (void)setPrivateApichatDomainName:(NSString *)domainName; #pragma mark - 登录校验 /** 登录校验 两种校验类型:1.直播相关参数校验 2.回放相关参数校验(vid为nil时进行直播相关参数校验,非空时进行回放相关参数校验) 1.直播相关参数校验:channelId、appId、userId、appSecret 2.回放相关参数校验:①vid、appId、channelId、userId;②vid、appId(channelId为0时,版本兼容) v1.0.0 版本之后请使用新接口 '+verifyLivePermissionWithChannelId:userId:appId:appSecret:completion:failure:' 和 '+verifyVodPermissionWithVid:userId:appId:appSecret:completion:failure:' 进行直播和回放的登录校验 @param channelId 直播频道号 @param vid 回放点播视频vid @param appId 云直播账号 应用Id @param userId 云直播账号 用户Id @param appSecret 云直播账号 应用密钥 */ + (void)verifyPermissionWithChannelId:(NSUInteger)channelId vid:(NSString *)vid appId:(NSString *)appId userId:(NSString *)userId appSecret:(NSString *)appSecret completion:(void (^)(NSDictionary *))completion failure:(void (^)(NSError *))failure DEPRECATED_MSG_ATTRIBUTE("已废弃,请使用verifyPermissionWithChannelId:vid:appId:userId:completion:failure:"); /** 登录校验 两种校验类型:1.直播相关参数校验 2.回放相关参数校验(vid为nil时进行直播相关参数校验,非空时进行回放相关参数校验) 1.直播相关参数校验:channelId、appId、userId 2.回放相关参数校验:①vid、appId、channelId、userId;②vid、appId(channelId为0时,版本兼容) v1.0.0 版本之后请使用新接口 '+verifyLivePermissionWithChannelId:userId:appId:appSecret:completion:failure:' 和 '+verifyVodPermissionWithVid:userId:appId:appSecret:completion:failure:' 进行直播和回放的登录校验 @param channelId 直播频道号 @param vid 回放点播视频vid @param appId 云直播账号 应用Id @param userId 云直播账号 用户Id */ + (void)verifyPermissionWithChannelId:(NSUInteger)channelId vid:(NSString *)vid appId:(NSString *)appId userId:(NSString *)userId completion:(void (^)(NSDictionary *))completion failure:(void (^)(NSError *))failure; /** 直播登录校验 API(v1.0.0版本+) 直播相关参数校验:channelId、userId、appId、appSecret @param channelId 频道号 @param userId 用户Id @param appId 应用Id @param appSecret 应用密钥 */ + (void)verifyLivePermissionWithChannelId:(NSUInteger)channelId userId:(NSString *)userId appId:(NSString *)appId appSecret:(NSString *)appSecret completion:(void (^)(NSDictionary *data))completion failure:(void (^)(NSError *error))failure DEPRECATED_MSG_ATTRIBUTE("已废弃,请使用verifyLivePermissionWithChannelId:userId:appId:completion:failure:"); /** 直播登录校验 API(v1.0.0版本+) 直播相关参数校验:channelId、userId、appId @param channelId 频道号 @param userId 用户Id @param appId 应用Id */ + (void)verifyLivePermissionWithChannelId:(NSUInteger)channelId userId:(NSString *)userId appId:(NSString *)appId completion:(void (^)(NSDictionary *data))completion failure:(void (^)(NSError *error))failure; /** 回放登录校验 API(v1.0.0版本+) 回放相关参数校验:channelId、vid、userId、appId、appSecret @param channelId 频道号 @param vid 回放点播视频vid @param userId 用户Id @param appId 应用Id @param appSecret 应用密钥 */ + (void)verifyVodPermissionWithChannelId:(NSUInteger)channelId vid:(NSString *)vid userId:(NSString *)userId appId:(NSString *)appId appSecret:(NSString *)appSecret completion:(void (^)(NSDictionary *data))completion failure:(void (^)(NSError *error))failure DEPRECATED_MSG_ATTRIBUTE("已废弃,请使用verifyVodPermissionWithChannelId:vid:userId:appId:completion:failure:"); /** 回放登录校验 API(v1.0.0版本+) 回放相关参数校验:channelId、vid、userId、appId @param vid 回放点播视频vid @param userId 用户Id @param appId 应用Id */ + (void)verifyVodPermissionWithChannelId:(NSUInteger)channelId vid:(NSString *)vid userId:(NSString *)userId appId:(NSString *)appId completion:(void (^)(NSDictionary *data))completion failure:(void (^)(NSError *error))failure; /// 推流登录,获取推流的频道信息 /// @param channelId 频道号 /// @param password 频道密码 /// @param channelType 频道类型,目前只支持(‘ppt’-三分屏/‘alone’-纯视频)两种频道类型 /// @param completion 成功回调 /// @param failure 失败回调 + (void)loadPushInfoWithChannelId:(NSString *)channelId password:(NSString *)password channelType:(PLVChannelType)channelType completion:(void (^)(NSDictionary *data, NSString *rtmpUrl))completion failure:(void (^)(NSError *error))failure; #pragma mark - 获取频道类型 & 直播状态 /** 校验后,根据channelId获取该频道的类型(普通直播,云课堂),和是否正在直播(废弃从0.13.1) @param channelId 频道号 */ + (void)liveStatus:(NSString *)channelId completion:(void (^)(BOOL, NSString *))completion failure:(void (^)(NSError *error))failure; /// 获取频道的直播类型、直播流状态(v2) /// /// @param channelId 频道号ID /// @param completion 请求完成Block (channelType:频道类型 streamState:当前直播流状态) /// @param failure 请求失败Block + (void)liveStatus2:(NSString *)channelId completion:(void (^)(PLVChannelType channelType, PLVChannelLiveStreamState streamState))completion failure:(void (^)(NSError *error))failure; /// 获取频道的直播类型、直播流状态(v3) /// /// @param channelId 频道号ID /// @param appId 云直播账号 应用Id /// @param appSecret 云直播账号 应用密钥 /// @param completion 请求完成Block (channelType:频道类型 streamState:当前直播流状态) /// @param failure 请求失败Block + (void)liveStatus2:(NSString *)channelId appId:(NSString *)appId appSecret:(NSString *)appSecret completion:(void (^)(PLVChannelType channelType, PLVChannelLiveStreamState streamState))completion failure:(void (^)(NSError *error))failure; /** 登录界面,校验后,根据vodId获取该频道的类型(普通直播,云课堂) @param vodId 回放视频ID */ + (void)getVodType:(NSString *)vodId completion:(void (^)(PLVChannelType channelType))completion failure:(void (^)(NSError *error))failure; /** 登录界面,校验后,根据文件Id获取该频道的类型(普通直播,云课堂) @param channelId 直播频道号 @param fileId 文件Id @param appId 云直播账号 应用Id @param appSecret 云直播账号 应用密钥 */ + (void)getLiveRecordTypeWithChannelId:(NSString *)channelId fileId:(NSString *)fileId appId:(NSString *)appId appSecret:(NSString *)appSecret completion:(void (^)(PLVChannelType))completion failure:(void (^)(NSError *error))failure; /** 获取频道菜单列表 @param channelId 频道号 */ + (void)getChannelMenuInfos:(NSString *)channelId completion:(void(^)(PLVLiveVideoChannelMenuInfo *channelMenuInfo))completion failure:(void (^)(NSError *error))failure; /** 修改频道名 @param channelName 频道名称 @param channelId 频道号 */ + (void)updateChannelName:(NSString *)channelName channelId:(NSString *)channelId completion:(void (^)(void))completion failure:(void (^)(NSError *error))failure; #pragma mark - 文档 /** 根据频道号 channelId 获取 文档列表数据 @note 用于 手机开播(三分屏)场景 @param channelId 频道号 */ + (void)requestDocumentListWithChannelId:(NSString *)channelId completion:(void (^)(NSArray<NSDictionary *> *responseArray))completion failure:(void (^)(NSError *error))failure; /// 获取文档列表数据 /// @note 用于 互动学堂 场景 /// @param lessonId 课节ID /// @param completion 成功回调 /// @param failure 失败回调 + (void)requestDocumentListWithLessonId:(NSString *)lessonId completion:(void (^)(NSArray<NSDictionary *> *responseArray))completion failure:(void (^)(NSError *error))failure DEPRECATED_MSG_ATTRIBUTE("Please use 'requestDocumentListWithLessonId:courseCode:teacher:completion:failure:' instead"); /// 获取文档列表数据 /// @note 用于 互动学堂 场景 /// @param lessonId 课节ID /// @param courseCode 课程号 /// @param teacher 是否为讲师 /// @param completion 成功回调 /// @param failure 失败回调 + (void)requestDocumentListWithLessonId:(NSString *)lessonId courseCode:(NSString * _Nullable)courseCode teacher:(BOOL)teacher completion:(void (^)(NSArray<NSDictionary *> *responseArray))completion failure:(void (^)(NSError *error))failure; /** 根据频道号 channelId、文件ID fileId 删除某个文档 @param channelId 频道号 @param fileId 文件ID */ + (void)deleteDocumentWithChannelId:(NSString * _Nullable)channelId fileId:(NSString *)fileId completion:(void (^)(void))completion failure:(void (^)(NSError *error))failure; /** 获取 PPT 文档转码结果 @note 用于 手机开播(三分屏)场景 @param channelId 频道号 @param fileId 文件ID */ + (void)getDocumentConvertStatusWithChannelId:(NSString *)channelId fileId:(NSString *)fileId completion:(void (^)(NSArray <NSDictionary *> *responseArray))completion failure:(void (^)(NSError *error))failure; /// 获取 PPT 文档转码结果 /// @note 用于 互动学堂 场景 /// @param lessonId 课程号 /// @param fileId 文件ID /// @param completion 成功回调 /// @param failure 失败回调 + (void)getDocumentConvertStatusWithLessonId:(NSString *)lessonId fileId:(NSString *)fileId completion:(void (^)(NSArray <NSDictionary *> *responseArray))completion failure:(void (^)(NSError *error))failure DEPRECATED_MSG_ATTRIBUTE("Please use 'getDocumentConvertStatusWithLessonId:fileId:courseCode:teacher:completion:failure:' instead"); /// 获取 PPT 文档转码结果 /// @note 用于 互动学堂 场景 /// @param lessonId 课程号 /// @param fileId 文件ID /// @param courseCode 课程号 /// @param teacher 是否为讲师 /// @param completion 成功回调 /// @param failure 失败回调 + (void)getDocumentConvertStatusWithLessonId:(NSString *)lessonId fileId:(NSString *)fileId courseCode:(NSString * _Nullable)courseCode teacher:(BOOL)teacher completion:(void (^)(NSArray <NSDictionary *> *responseArray))completion failure:(void (^)(NSError *error))failure; #pragma mark - 聊天室相关 /** 获取 chatToken @param channelId 频道号 @param userId 聊天室用户ID @param role 聊天室用户角色 @Param groupId 聊天室分组Id */ + (void)getChatTokenWithChannelId:(NSString *)channelId userId:(NSString *)userId role:(NSString *)role groupId:(NSString * _Nullable)groupId completion:(void (^)(NSDictionary *))completion failure:(void (^)(NSError *error))failure; /** 获取 chatToken,分组Id默认为空 @param channelId 频道号 @param userId 聊天室用户ID @param role 聊天室用户角色 */ + (void)getChatTokenWithChannelId:(NSString *)channelId userId:(NSString *)userId role:(NSString *)role completion:(void (^)(NSDictionary *))completion failure:(void (^)(NSError *error))failure; /** 获取 chatToken,身份默认为 viewer @param channelId 频道号 @param userId 聊天室用户ID */ + (void)getChatTokenWithChannelId:(NSString *)channelId userId:(NSString *)userId completion:(void (^)(NSDictionary *data))completion failure:(void (^)(NSError *error))failure; /** 加载聊天室开关信息 @param roomId 频道号 */ + (void)loadChatroomFunctionSwitchWithRoomId:(NSUInteger)roomId completion:(void (^)(NSDictionary *switchInfo))completion failure:(void (^ _Nullable)(NSError *error))failure; /** 根据时间戳加载聊天室历史记录 @param roomId 频道号 @param index 如果目前展示的消息已经有time为timestamp,且有1条,index不用传或者传1。假如有两条,则index传2,三条传3,依此类推。 @param size 每页长度 @param timestamp 从该时间戳开始获取,不传表示获取最新的数据 @param order 数据根据时间戳的顺序,YES表示从小到大,NO表示从大到小 */ + (void)requestChatRoomHistoryWithRoomId:(NSString *)roomId index:(NSUInteger)index size:(NSInteger)size timestamp:(NSString *)timestamp order:(BOOL)order completion:(void (^)(NSArray * _Nonnull))completion failure:(void (^)(NSError * _Nonnull))failure; /** 加载聊天室历史记录 @param roomId 频道号 @param startIndex 开始index @param endIndex 结束index */ + (void)requestChatRoomHistoryWithRoomId:(NSString *)roomId startIndex:(NSUInteger)startIndex endIndex:(NSInteger)endIndex completion:(void (^)(NSArray *historyList))completion failure:(void (^)(NSError *error))failure; /** 获取聊天室在线人数列表接口 1 @param roomId 频道号/房间号 @param page 页码 @param length 一页的数据条数 @param streamer YES-当前用户为讲师和特殊身份,返回classStatus字段(非讲师身份不可为YES,会有性能问题) */ + (void)requestChatRoomListUsersWithRoomId:(NSString *)roomId page:(NSUInteger)page length:(NSUInteger)length streamer:(BOOL)streamer success:(void (^)(NSDictionary *data))success failure:(void (^ _Nullable)(NSError *error))failure; /** 获取聊天室在线人数列表接口 2 @param roomId 频道号/房间号 @param page 页码 @param length 一页的数据条数 @param sessionId 场次ID,目前该参数只用于互动学堂场景 @param streamer YES-当前用户为讲师和特殊身份,返回classStatus字段(非讲师身份不可为YES,会有性能问题) */ + (void)requestChatRoomListUsersWithRoomId:(NSString *)roomId page:(NSUInteger)page length:(NSUInteger)length sessionId:(NSString * _Nullable)sessionId streamer:(BOOL)streamer success:(void (^)(NSDictionary *))success failure:(void (^ _Nullable)(NSError *))failure; /** 获取聊天室具体房间号被踢出的用户列表 @param roomId 频道号/房间号 */ + (void)requestChatRoomListKickedWithRoomId:(NSString *)roomId success:(void (^)(NSArray *responseArray))success failure:(void (^)(NSError *error))failure; /** 获取图片表情列表接口 @param roomId 频道号/房间号 @param accountId 账号Id @param page 页码 @param size 一页的数据条数 */ + (void)requestEmotionImagesWithRoomId:(NSUInteger)roomId accountId:(NSString *)accountId page:(NSUInteger)page size:(NSUInteger)size success:(void (^)(NSDictionary *data))success failure:(void (^ _Nullable)(NSError *error))failure; /** 点赞 @param channelId 频道号 @param viewerId 聊天室用户Id @param times 某段时间内新增点赞数 */ + (void)likeWithChannelId:(NSUInteger)channelId viewerId:(NSString *)viewerId times:(NSUInteger)times completion:(void (^)(void))completion failure:(void (^ _Nullable )(NSError *error))failure; /** 发送图片 @param image 图片 @param imageName 图片名字 @param channelId 频道号 */ + (void)uploadImage:(UIImage *)image imageName:(NSString *)imageName channelId:(NSString *)channelId progress:(void (^)(float))progressBlock success:(void (^)(NSDictionary *tokenDict, NSString *key, NSString *imageName))successBlock fail:(void (^)(NSError *error))failBlock; /** 发送图片 @note 使用该方法上传的图片,会压缩到小于2MB为止 @param image 图片 @param imageName 图片名字 */ + (void)uploadImage:(UIImage *)image imageName:(NSString *)imageName progress:(void (^)(float))progressBlock success:(void (^)(NSDictionary *tokenDict, NSString *key, NSString *imageName))successBlock fail:(void (^)(NSError *error))failBlock DEPRECATED_MSG_ATTRIBUTE("已废弃,请使用uploadImage:imageName:channelId:progress:success:fail:"); /** 发送图片 @note 使用该方法上传的图片,不会再进行压缩 @param imageData 图片数据 @param imageName 图片名字 @param channelId 频道号 */ + (void)uploadImageData:(NSData *)imageData imageName:(NSString *)imageName channelId:(NSString *)channelId progress:(void (^)(float))progressBlock success:(void (^)(NSDictionary *tokenDict, NSString *key, NSString *imageName))successBlock fail:(void (^)(NSError *error))failBlock; /** 发送图片 @note 使用该方法上传的图片,不会再进行压缩 @param imageData 图片数据 @param imageName 图片名字 */ + (void)uploadImageData:(NSData *)imageData imageName:(NSString *)imageName progress:(void (^)(float))progressBlock success:(void (^)(NSDictionary *tokenDict, NSString *key, NSString *imageName))successBlock fail:(void (^)(NSError *error))failBlock DEPRECATED_MSG_ATTRIBUTE("已废弃,请使用uploadImageData:imageName:channelId:progress:success:fail:"); /** 增加播放热度 @param channelId 频道号 @param times 新增 socket login 次数(收到自己的 login 消息一次 times +1) */ + (void)increaseViewerWithChannelId:(NSString *)channelId times:(NSUInteger)times completion:(void (^)(NSInteger))completion failure:(void (^)(NSError *error))failure; /// 获取当前观看次数 /// @param channelId 频道号 + (void)requestPageViewWithChannelId:(NSString *)channelId completion:(void (^)(NSDictionary *data))completion failure:(void (^)(NSError *error))failure; /// 加载聊天室提醒消息历史记录 /// @param roomId 频道号 /// @param startIndex 开始index /// @param endIndex 结束index /// @param completion 成功回调 /// @param failure 失败回调 + (void)requestChatRoomRemindHistoryWithRoomId:(NSString *)roomId startIndex:(NSUInteger)startIndex endIndex:(NSInteger)endIndex completion:(void (^)(NSArray *historyList))completion failure:(void (^)(NSError *error))failure; /// 获取最新红包 /// @param channelId 频道号 /// @param completion 成功回调 /// @param failure 失败回调 + (void)requestNewestRedpackWithChannelId:(NSString *)channelId completion:(void (^)(NSDictionary *data))completion failure:(void (^_Nullable)(NSError *error))failure; /// 判断观众是否已抢红包 /// @param channelId 频道号 /// @param viewerId 观众viewerId /// @param redpackId 红包ID /// @param redCacheId 红包CacheID /// @param completion 成功回调 /// @param failure 失败回调 + (void)requestRedpackReceiveCacheWithChannelId:(NSString *)channelId viewerId:(NSString *)viewerId redpackId:(NSString *)redpackId redCacheId:(NSString *)redCacheId completion:(void (^)(NSDictionary *data))completion failure:(void (^_Nullable)(NSError *error))failure; /// 加载聊天室提问消息历史记录 /// @param roomId 频道号 /// @param page 页码 /// @param pageSize 每页的size /// @param completion 成功回调 /// @param failure 失败回调 + (void)requestChatRoomQuestionHistoryWithRoomId:(NSString *)roomId page:(NSUInteger)page pageSize:(NSInteger)pageSize completion:(void (^)(NSDictionary *data))completion failure:(void (^)(NSError * _Nonnull))failure; #pragma mark - 连麦相关 /** 普通直播,获取推流端是旧的推流端(主讲人走CDN视频,连麦走RTC音频),还是新的推流端(主讲人走RTC视频,连麦走RTC) @param channelId 频道号 */ + (void)rtcEnabled:(NSUInteger)channelId completion:(void (^)(BOOL))completion failure:(void (^)(NSError *))failure; /** 检测当前连麦状态 @param roomId 频道号 */ + (void)requestLinkMicStatusWithRoomId:(NSUInteger)roomId completion:(void (^)(NSString *, NSString *))completion failure:(void (^)(NSError *))failure; /** 获取当前连麦列表 @param roomId 频道号 @param sessionId 当前直播的sessionId */ + (void)requestLinkMicOnlineListWithRoomId:(NSString *)roomId sessionId:(NSString *)sessionId completion:(void (^)(NSDictionary *))completion failure:(void (^)(NSError *))failure; /** 获取当前连麦列表 @param roomId 频道号 @param sessionId 当前直播的sessionId @param getSubRooms 是否获取转播子频道信息,默认为NO */ + (void)requestLinkMicOnlineListWithRoomId:(NSString *)roomId sessionId:(NSString *)sessionId getSubRooms:(BOOL)getSubRooms completion:(void (^)(NSDictionary *))completion failure:(void (^)(NSError *))failure; /** 连麦id和聊天室用户id关联 @param channelId 频道号 @param viewerId 聊天室的用户Id @param linkMicId 连麦id */ + (void)requestViewerIdLinkMicIdRelate:(NSString *)channelId viewerId:(NSString *)viewerId linkMicId:(NSString *)linkMicId completion:(nullable void (^)(void))completion failure:(nullable void (^)(NSError *))failure; /** 强制下麦 @param channelId 频道号 @param userId 连麦用户ID @param linkMicId 连麦id */ + (void)requestLinkMicRemoveUser:(NSString *)channelId userId:(NSString *)userId linkMicId:(NSString *)linkMicId completion:(void (^)(BOOL))completion failure:(void (^)(NSError *))failure; #pragma mark - SIP相关 /** 获取SIP入会信息 @param channelId 频道号 */ + (void)requestSIPInfoWithChannelId:(NSString *)channelId completion:(void (^)(NSDictionary *data))completion failure:(void (^)(NSError * error))failure; /** 获取当前拨号情况列表 @param channelId 频道号 */ + (void)requestSIPDialLinesListWithChannelId:(NSString *)channelId completion:(void (^)(NSDictionary *data))completion failure:(void (^)(NSError *error))failure; #pragma mark - 抽奖 /** 发送中奖信息(自 v0.11.1 失效) @param data 中奖信息 */ + (void)postLotteryWithData:(NSDictionary *)data completion:(void (^)(void))completion failure:(void (^)(NSError *error))failure; /** 发送中奖信息(自 v0.11.1 生效) @param data 中奖信息 */ + (void)newPostLotteryWithData:(NSDictionary *)data completion:(void (^)(void))completion failure:(void (^)(NSError *error))failure; /** 放弃领奖 @param channelId 频道号 @param userId 聊天室用户ID */ + (void)giveUpReceiveWithChannelId:(NSString *)channelId userId:(NSString *)userId completion:(void (^)(NSString *))completion failure:(void (^)(NSError *error))failure; #pragma mark - 礼物打赏 /** 获取该频道打赏设置 @param channelId 频道号 */ + (void)requestRewardWithChannelId:(NSString *)channelId completion:(void (^)(NSDictionary*))completion failure:(void (^)(NSError * _Nonnull))failure; /** 获取该频道积分打赏设置 @param channelId 频道号 */ + (void)requestPointSettingWithChannelId:(NSUInteger)channelId completion:(nullable void (^)(NSDictionary *))completion failure:(nullable void (^)(NSError *))failure; /** 获取观众的积分信息 @param viewerId 聊天室用户Id @param nickName 观众的用户昵称 @param channelId 频道号 */ + (void)requestViewerPointWithViewerId:(NSString *)viewerId nickName:(NSString *)nickName channelId:(NSUInteger)channelId completion:(nullable void (^)(NSString *))completion failure:(nullable void (^)(NSError *))failure; /** 观众打赏积分道具 @param viewerId 聊天室用户Id @param nickName 观众的昵称 @param avatar 观众的头像地址 @param goodId 商品id @param goodNum 商品数量 @param channelId 频道号 */ + (void)requestViewerRewardPointWithViewerId:(NSString *)viewerId nickName:(NSString *)nickName avatar:(NSString *)avatar goodId:(NSInteger)goodId goodNum:(NSInteger)goodNum channelId:(NSUInteger)channelId completion:(nullable void (^)(NSString *))completion failure:(nullable void (^)(NSError *))failure; /** 观众打赏免费道具 @param viewerId 聊天室用户Id @param nickName 观众的昵称 @param avatar 观众的头像地址 @param goodId 商品id @param goodNum 商品数量 @param channelId 频道号 @param sessionId 场次号 */ + (void)requestViewerFreeDonateRewardWithViewerId:(NSString *)viewerId nickName:(NSString *)nickName avatar:(NSString *)avatar goodId:(NSInteger)goodId goodNum:(NSInteger)goodNum channelId:(NSUInteger)channelId sessionId:(NSString *)sessionId completion:(nullable void (^)(void))completion failure:(nullable void (^)(NSError *))failure; /// 获取卡片推送相关信息 /// @param channelId 频道id /// @param cardPushId 商品推送id + (void)requestCardPushInfoWithChannelId:(NSString *)channelId cardPushId:(NSString *)cardPushId completion:(void (^)(NSDictionary *cardDict))completion failure:(nullable void (^)(NSError *))failure; /// 查询频道打赏设置(新版后台) /// @param channelId 频道号 /// + (void)requestDonateWithChannelId:(NSString *)channelId completion:(void (^)(NSDictionary*))completion failure:(void (^)(NSError * _Nonnull))failure; /// 修改频道礼物打赏开关 + (void)updateDonateGiftWithChannelId:(NSString *)channelId donateGiftEnabled:(BOOL)donateGiftEnabled completion:(nullable void (^)(void))completion failure:(void (^)(NSError * _Nonnull))failure; #pragma mark - 直播回放 /** 获取视频弹幕信息 */ + (void)loadDanmuWithVid:(NSString *)vid time:(NSString *)time msgId:(NSUInteger)msgId limit:(NSUInteger)limit completion:(void (^)(NSArray *danmuArr, NSError *error))completion; /** 新增回放弹幕 */ + (void)addDanmuWithVid:(NSString *)vid msg:(NSString *)msg time:(NSString *)time sessionId:(NSString *)sessionId msgType:(NSString *)msgType user:(NSString *)user completion:(void (^)(NSDictionary *respondDict, NSError *error))completion; /// 查询频道回放功能开关 /// @param channelId 频道号 /// @param appId 用户appId /// @param appSecret 用户appSecret /// @param completion 请求完成块 + (void)requestPlaybackEnableWithChannelId:(NSString *)channelId appId:(NSString *)appId appSecret:(NSString *)appSecret completion:(void (^)(BOOL enable , NSError * _Nullable error))completion; /// 查询回放视频的视频列表信息(区分是否是接收转播的频道) /// @param channelId 频道号 /// @param listType playback-回放列表,vod-点播列表; 默认普通直播场景为vod,三分屏为playback /// @param page 页数,默认每页显示12条数据 /// @param pageSize 每页显示的数据条数,0为默认值 /// @param appId 用户appId /// @param appSecret 用户appSecret /// @param completion 请求完成块 + (void)requestPlaybackListWithChannelId:(NSString *)channelId listType:(NSString *)listType page:(NSUInteger)page pageSize:(NSUInteger)pageSize appId:(NSString *)appId appSecret:(NSString *)appSecret completion:(void (^)(PLVPlaybackListModel * _Nullable model, NSError * _Nullable error))completion; /// 查询回放视频的视频列表信息 /// @param channelId 频道号 /// @param listType playback-回放列表,vod-点播列表; 默认普通直播场景为vod,三分屏为playback /// @param page 页数,默认每页显示12条数据 /// @param pageSize 每页显示的数据条数,0为默认值 /// @param appId 用户appId /// @param appSecret 用户appSecret /// @param completion 请求完成块 + (void)requestPlaybackList:(NSString *)channelId listType:(NSString *)listType page:(NSUInteger)page pageSize:(NSUInteger)pageSize appId:(NSString *)appId appSecret:(NSString *)appSecret completion:(void (^)(PLVPlaybackListModel * _Nullable model, NSError * _Nullable error))completion DEPRECATED_MSG_ATTRIBUTE("已废弃,请使用requestPlaybackListWithChannelId:listType:page:pageSize:appId:appSecret:completion:"); /// 查询章节功能开关 /// @param channelId 频道号 /// @param completion 请求完成块 + (void)requestLivePlaybackSectionEnableWithChannelId:(NSString *)channelId completion:(void (^)(BOOL enable))completion failure:(void (^)( NSError * _Nullable error))failure DEPRECATED_MSG_ATTRIBUTE("已废弃,请使用requestChannelPlaybackSettingWithChannelId:appId:completion:failure:"); /// 获取回放章节列表 (v2) /// @param channelId 频道号 /// @param videoId 直播系统生成的回放id /// @param appId 用户appId /// @param appSecret 用户appSecret /// @param completion 请求完成块 + (void)requestLivePlaybackSectionListWithChannelId:(NSString *)channelId videoId:(NSString *)videoId appId:(NSString *)appId appSecret:(NSString *)appSecret completion:(void (^)(NSArray<PLVLivePlaybackSectionModel *> *sectionList, NSError * _Nullable error))completion; /// 获取回放章节列表 /// @param channelId 频道号 /// @param videoId 直播系统生成的回放id /// @param completion 请求完成块 + (void)requestLivePlaybackSectionListWithChannelId:(NSString *)channelId videoId:(NSString *)videoId completion:(void (^)(NSArray<PLVLivePlaybackSectionModel *> *sectionList, NSError * _Nullable error))completion; /// 查询回放功能设置 /// @param channelId 频道号 /// @param appId 用户appId /// @param vid 视频vid /// @param playbackType 回放类型 /// @param completion 请求完成块,回放设置可为空 + (void)requestChannelPlaybackInfoWithChannelId:(NSString *)channelId appId:(NSString *)appId appSecret:(NSString *)appSecret vid:(NSString * _Nullable)vid playbackType:(NSString * _Nullable)playbackType completion:(void (^)(PLVChannelPlaybackInfoModel * _Nullable channelPlaybackInfo))completion failure:(void (^)( NSError * _Nullable error))failure; /// 查询回放功能设置 /// @param channelId 频道号 /// @param completion 请求完成块,回放设置可为空 + (void)requestChannelPlaybackInfoWithChannelId:(NSString *)channelId completion:(void (^)(PLVChannelPlaybackInfoModel * _Nullable channelPlaybackInfo))completion failure:(void (^)( NSError * _Nullable error))failure DEPRECATED_MSG_ATTRIBUTE("已废弃,请使用requestChannelPlaybackSettingWithChannelId:appId:completion:failure:"); /// 获取录制文件章节列表 (v2) /// @param channelId 频道号 /// @param fileId 录制文件id /// @param appId 用户appId /// @param appSecret 用户appSecret /// @param completion 请求完成块 + (void)requestLiveRecordSectionListWithChannelId:(NSString *)channelId fileId:(NSString *)fileId appId:(NSString *)appId appSecret:(NSString *)appSecret completion:(void (^)(NSArray<PLVLivePlaybackSectionModel *> *sectionList, NSError * _Nullable error))completion; /// 获取录制文件章节列表 /// @param channelId 频道号 /// @param fileId 录制文件id /// @param completion 请求完成块 + (void)requestLiveRecordSectionListWithChannelId:(NSString *)channelId fileId:(NSString *)fileId completion:(void (^)(NSArray<PLVLivePlaybackSectionModel *> *sectionList, NSError * _Nullable error))completion; /// 修改频道开关状态设置 /// @param channelId 频道号 /// @param playbackEnabled 回放开关状态 /// @param completion 请求完成块 + (void)updatePlaybackSettingWithChannelId:(NSString *)channelId playbackEnabled:(BOOL)playbackEnabled completion:(nullable void (^)(void))completion failure:(void (^)(NSError * _Nonnull))failure; #pragma mark - 跑马灯 /** 加载自定义跑马灯 @param url 自定义跑马灯地址 @param channelId 直播频道号 @param userId 云直播账号 用户ID @param code 自定义跑马灯附带参数 @param completion 加载成功 @param failure 加载失败 */ + (void)loadCustomMarquee:(NSURL *)url withChannelId:(NSUInteger)channelId userId:(NSString *)userId code:(NSString *)code completion:(void (^)(BOOL valid, NSDictionary *marqueeDict))completion failure:(void (^)(NSError *error))failure; #pragma mark - 商品 /** 获取商品列表 @param channelId 频道号 @param rank 排序号 (加载序号以前的商品) @param count 获取列表数据大小,默认10条,最大20 @param completion 加载成功(返回商品列表顺序与后台显示顺序一致) @param failure 加载失败 */ + (void)loadCommodityList:(NSUInteger)channelId rank:(NSUInteger)rank count:(NSUInteger)count completion:(void (^)(NSUInteger total, NSArray<PLVCommodityModel *> *commoditys))completion failure:(void (^)(NSError *error))failure; #pragma mark - 海报 /// 获取邀请海报设置 /// @param channelId 频道号 /// @param success 请求成功 /// @param failure 请求失败 + (void)requestInvitePosterWithChannelId:(NSString *)channelId success:(void (^) (NSDictionary *respondDict))success failure:(void (^)(NSError * error))failure; #pragma mark - 推流 /// 更新频道直播状态至结束接口 /// /// @param channelId 频道号 /// @param stream 流名 /// @param success 请求成功 /// @param failure 请求失败 + (void)requestChannelLivestatusEndWithChannelId:(NSString *)channelId stream:(NSString *)stream success:(void (^)(NSString *))success failure:(void (^)(NSError * error))failure; #pragma mark - 分组 /// 获取分组列表 /// @param channelId 频道号 /// @param appId appId /// @param channelToken api频道token /// @param success 请求成功 /// @param failure 请求失败 + (void)requestGroupListWithChannelId:(NSString *)channelId appId:(NSString *)appId channelToken:(NSString *)channelToken success:(void (^)(NSArray<NSDictionary *> *groupArray))success failure:(void (^ _Nullable)(NSError * error))failure; #pragma mark 观看页用户列表 /// 获取观看页用户列表 /// @param roomId 频道号 /// @param success 请求成功 /// @param failure 请求失 + (void)requestViewerListWithRoomId:(NSString *)roomId success:(void (^)(NSDictionary *viewerListDict))success failure:(void (^ _Nullable)(NSError * error))failure; /// 获取观看页分组用户列表 /// @param roomId 频道号 /// @param groupId 分组 /// @param success 请求成功 /// @param failure 请求失 + (void)requestViewerListWithRoomId:(NSString *)roomId groupId:(NSString *)groupId success:(void (^)(NSDictionary *viewerListDict))success failure:(void (^ _Nullable)(NSError * error))failure; #pragma mark 多会场 + (void)requestMultiMeetingListWithChannelId:(NSString *)channelId mainChannelId:(NSString *)mainChannelId pageNumber:(NSUInteger)pageNumber pageSize:(NSUInteger)pageSize success:(void (^) (NSDictionary *multiMeetingList))success failure:(void (^ _Nullable)(NSError * error))failure; + (void)requestMultiMeetingLiveStatusWithMainChannelId:(NSString *)mainChannelId success:(void (^) (NSArray *multiMeetingLiveStatusList))success failure:(void (^ _Nullable)(NSError * error))failure; @end
Swift
class PLVLiveVideoAPI : NSObject
-
频道信息数据模型
See moreDeclaration
Objective-C
@interface PLVChannelInfoModel : NSObject
Swift
class PLVChannelInfoModel : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVLiveRecordFileModel : PLVSafeModel /// 文件ID @property (nonatomic, copy) NSString *fileId; /// m3u8资源地址 @property (nonatomic, copy) NSString *m3u8; /// mp4资源地址 @property (nonatomic, copy) NSString *mp4; /// 频道场次ID @property (nonatomic, copy) NSString *channelSessionId; /// 时长 @property (nonatomic, copy) NSString *duration; /// 原始场次ID @property (nonatomic, copy) NSString *originSessionId; /// 来源 @property (nonatomic, copy) NSString *origin; @end
Swift
class PLVLiveRecordFileModel
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVTargetPlaybackVideoModel : PLVSafeModel /// 点播视频vid @property (nonatomic, copy) NSString *videoId; /// 直播系统生成的id @property (nonatomic, copy) NSString *videoPoolId; /// 资源地址 @property (nonatomic, copy) NSString *fileUrl; /// 频道场次ID @property (nonatomic, copy) NSString *channelSessionId; /// 时长 @property (nonatomic, copy) NSString *duration; /// 原始场次ID @property (nonatomic, copy) NSString *originSessionId; /// 来源 @property (nonatomic, copy) NSString *origin; /// 文件ID @property (nonatomic, copy) NSString *fileId; /// 视频加密状态,1表示为加密状态,0为非加密 @property (nonatomic, assign) long seed; @end
Swift
class PLVTargetPlaybackVideoModel
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVChannelPlaybackInfoModel : PLVSafeModel /// 是否有回放视频,值为Y/N @property (nonatomic, assign, readonly) BOOL hasPlaybackVideo; /// 是否有录制文件,值为Y/N @property (nonatomic, assign, readonly) BOOL hasRecordFile; /// 频道回放开关,值为Y/N @property (nonatomic, assign, readonly) BOOL enablePlayBack; /// 频道回放来源,record为暂存列表,playback为回放列表,vod为点播列表 @property (nonatomic, copy, readonly) NSString *playbackOrigin; /// 点播用户状态,值为Y/N @property (nonatomic, assign, readonly) BOOL vodUserStatus; /// 回放章节功能开关,值为Y/N @property (nonatomic, copy, readonly) NSString *sectionEnabled; /// 录制文件 @property (nonatomic, strong, readonly) PLVLiveRecordFileModel *recordFile; /// 回放视频 @property (nonatomic, strong, readonly) PLVTargetPlaybackVideoModel *targetPlaybackVideo; /// 点播地址 @property (nonatomic, copy, readonly) NSString *vodUrl; /// 点播sessionId @property (nonatomic, copy, readonly) NSString *vodSessionId; /// 播放场次ID @property (nonatomic, copy, readonly) NSString *targetSessionId; /// 回放方式,single为单个回放,list为列表回放 @property (nonatomic, copy, readonly) NSString *type; /// 回放类型,vod为点播回放,playback为直播回放 @property (nonatomic, copy, readonly) NSString *playbackType; @end
Swift
class PLVChannelPlaybackInfoModel
-
商品数据模型
See moreDeclaration
Objective-C
@interface PLVCommodityModel : NSObject
Swift
class PLVCommodityModel : NSObject
-
回放章节信息数据模型
See moreDeclaration
Objective-C
@interface PLVLivePlaybackSectionModel
Swift
class PLVLivePlaybackSectionModel
-
tab子菜单信息
See moreDeclaration
Objective-C
@interface PLVLiveVideoChannelMenu
Swift
class PLVLiveVideoChannelMenu
-
频道菜单信息
See moreDeclaration
Objective-C
@interface PLVLiveVideoChannelMenuInfo
Swift
class PLVLiveVideoChannelMenuInfo
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVPlaybackVideoModel : PLVSafeModel /// 是否为默认播放视频,值为Y/N @property (nonatomic, copy) NSString *asDefault; /// 回放视频对应的直播频道id @property (nonatomic, copy) NSString *channelId; /// 用于PPT请求数据,与PPT直播的回放相关,普通直播回放值为null @property (nonatomic, copy) NSString *channelSessionId; /// 视频长度 @property (nonatomic, copy) NSString *duration; /// 视频首图 @property (nonatomic, copy) NSString *firstImage; /// 视频合并信息,后续补充 @property (nonatomic, copy) NSString *mergeinfo; /// 默认视频的播放清晰度,1为流畅,2为高清,3为超清 @property (nonatomic, copy) NSString *myBr; /// 访客信息收集id @property (nonatomic, copy) NSString *qid; /// 视频加密状态,1表示为加密状态,0为非加密 @property (nonatomic, assign) long seed; /// 直播开始时间 @property (nonatomic, copy) NSString *startTime; /// 视频标题 @property (nonatomic, copy) NSString *title; /// 视频播放地址,注:如果视频为加密视频,则此地址无法访问 @property (nonatomic, copy) NSString *url; /// 点播后台用户id @property (nonatomic, copy) NSString *userId; /// 直播系统生成的id @property (nonatomic, copy) NSString *videoId; /// 点播视频vid @property (nonatomic, copy) NSString *videoPoolId; /// 直播类型 @property (nonatomic, copy) NSString *liveType; /// 添加为回放视频的日期 @property (nonatomic, copy) NSString *createdTime; /// 视频最后修改日期 @property (nonatomic, copy) NSString *lastModified; @end
Swift
class PLVPlaybackVideoModel
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVPlaybackListModel : PLVSafeModel /// 回放视频总个数 @property (nonatomic, assign) long totalItems; /// 总页数 @property (nonatomic, assign) long totalPages; /// 当前页第一个视频在回放视频中的位置 @property (nonatomic, assign) long startRow; /// 当前页最后一个视频在回放视频中的位置 @property (nonatomic, assign) long endRow; /// 是否为第一页,值为:true/false @property (nonatomic, assign) BOOL firstPage; /// 是否为最后一页,值为:true/false @property (nonatomic, assign) BOOL lastPage; /// 上一页编号 @property (nonatomic, assign) long prePageNumber; /// 下一页编号 @property (nonatomic, assign) long nextPageNumber; /// 当前页视频个数 @property (nonatomic, assign) long limit; /// 视频列表页数(默认以12条数据为1页) @property (nonatomic, assign) long pageNumber; /// 视频列表 @property (nonatomic, copy) NSArray<PLVPlaybackVideoModel *> *contents; @end
Swift
class PLVPlaybackListModel
-
Deprecated
已废弃,请使用PLVWebViewBridge
PPT视图
Note
直播,添加至相应视图中即可; 回放,添加至相应视图中,并调用 [pptStart] 方法即可;
See more// 直播场景 代码演示 // 1.创建及加载 PLVPPTWebview * pptWebiew = [[PLVPPTWebview alloc] init]; [someView addSubview:pptWebiew]; pptWebiew.frame = someView.bounds; [pptWebiew loadOnlinePPT]; // 2. socket 登录成功后设置用户信息 pptWebiew.userInfo = userInfo; // 3. 接收到 socket PPT事件则执行刷新 [pptWebiew refreshPPT:json];
Declaration
Objective-C
@interface PLVPPTWebview
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVPlaybackCacheManager : NSObject + (PLVPlaybackVideoCacheState)stateOfPlaybackPlayerCacheState:(NSString *)fileId; + (void)asynGetPlaybackPlayerCacheState:(NSString *)fileId completion:(void (^)(PLVPlaybackVideoCacheState state))completion; /// 添加 videoPoolId 至下载队列 (适用于回放列表、点播列表这两个有videoPoolId 的视频下载) + (void)enqueueDownloadQueueWithVideoPoolId:(NSString *)videoPoolId channelId:(NSString *)channelId completion:(void (^)(NSError *error))completion; /// 添加 暂存视频的 fileId 至下载队列 (仅适用于暂存视频的下载) + (void)enqueueDownloadQueueWithRecordFileId:(NSString *)fileId channelId:(NSString *)channelId completion:(void (^)(NSError *error))completion; /// 添加 PLVPlaybackVideoInfoModel 至下载队列 + (void)enqueueDownloadQueueWithPlaybackPlayerModel:(PLVPlaybackVideoInfoModel *)playerModel completion:(void (^)(NSError *error))completion; @end
Swift
class PLVPlaybackCacheManager : NSObject
-
Declaration
Objective-C
@interface PLVPlayer : NSObject
Swift
class PLVPlayer : NSObject
-
回放视频的信息model
See moreDeclaration
Objective-C
@interface PLVPlaybackVideoInfoModel : NSObject
Swift
class PLVPlaybackVideoInfoModel : NSObject
-
本地播放回放模型(代表下载完成的回放)
See moreDeclaration
Objective-C
@interface PLVPlaybackLocalVideoInfoModel : PLVPlaybackVideoInfoModel
Swift
class PLVPlaybackLocalVideoInfoModel : PLVPlaybackVideoInfoModel
-
更新公共流信息时所需的数据模型
See moreDeclaration
Objective-C
@interface PLVPublicStreamGetInfoModel : NSObject
Swift
class PLVPublicStreamGetInfoModel : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVLivePictureInPictureManager : NSObject #pragma mark - [ 属性 ] #pragma mark 可配置项 /// 画中画恢复前的用户界面逻辑代理 @property (nonatomic, weak, nullable) id <PLVLivePictureInPictureRestoreDelegate> restoreDelegate; /// 设置画中画开启模式,请在创建播放器前设置此属性(默认PLVLivePictureInPictureMode_AVPlayer) @property (nonatomic, assign) PLVLivePictureInPictureMode pictureInPictureMode; /// 画中画控件(包括播放/暂停、快进、后退)是否可见(YES 可见,NO不可见 默认 YES 可见) @property (nonatomic, assign) BOOL pictureInPictureControlsVisible; /// 是否允许在切换到后台时自动启动画中画,默认NO @property (nonatomic, assign) BOOL canAutoStartPictureInPicture; /// 画中画播放器是否正在播放正片 @property (nonatomic, assign, readonly) BOOL pictureInPicturePlayerPlaying; /// 画中画小窗是否开启 @property (nonatomic, assign, readonly) BOOL pictureInPictureActive; /// 小窗触发模式 是否是后台自动启动小窗 @property (nonatomic, assign, readonly) BOOL isAutoStarted; #pragma mark - [ 方法 ] /// 单例方法 + (instancetype)sharedInstance; /// 停止画中画 - (void)stopPictureInPicture; /// 检查是否支持开启画中画,ipad需要在9.0以上版本,iPhone需要在14.0以上版本 - (BOOL)checkPictureInPictureSupported; /// 静音画中画 - (void)mute; /// 取消静音画中画 - (void)cancelMute; @end
Swift
class PLVLivePictureInPictureManager : NSObject
-
直播回放播放器
Note
直播回放播放器 继承自 PLVPlayer.h; 若您希望了解 播放器基础功能 相关属性方法,可查看 PLVPlayer.h; 若您希望了解 直播回放业务 相关属性方法,可查看 PLVLivePlaybackPlayer.h;
See more// 使用演示 PLVLivePlaybackPlayer * livePlaybackPlayer = [[PLVLivePlaybackPlayer alloc] initWithPLVAccountUserId:accountUserId channelId:channelId vodId:vodId vodList:NO]; livePlaybackPlayer.delegate = self; livePlaybackPlayer.livePlaybackDelegate = self; [livePlaybackPlayer setupDisplaySuperview:displaySuperview];
Declaration
Objective-C
@interface PLVLivePlaybackPlayer : PLVPlayer <PLVLivePlayerPictureInPictureProtocol>
Swift
class PLVLivePlaybackPlayer : PLVPlayer, PLVLivePlayerPictureInPictureProtocol
-
直播播放器
Note
若您希望了解 播放器基础功能 相关属性方法,可查看父类 PLVPlayer.h; 若您希望了解 直播业务 相关属性方法,可查看 PLVLivePlayer.h;
See more// 使用演示 PLVLivePlayer * livePlayer = [[PLVLivePlayer alloc] initWithPLVAccountUserId:accountUserId channelId:channelId]; livePlayer.delegate = self; livePlayer.liveDelegate = self; [livePlayer setupDisplaySuperview:displaySuperview];
Declaration
Objective-C
@interface PLVLivePlayer : PLVPlayer <PLVLivePlayerPictureInPictureProtocol>
Swift
class PLVLivePlayer : PLVPlayer, PLVLivePlayerPictureInPictureProtocol
-
公共流播放器
See moreDeclaration
Objective-C
@interface PLVPublicStreamPlayer : NSObject
Swift
class PLVPublicStreamPlayer : NSObject
-
直播 SDK 配置文件
See moreDeclaration
Objective-C
@interface PLVLiveVideoConfig : NSObject
Swift
class PLVLiveVideoConfig : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVClientPushStreamTemplateAudioParams: NSObject /// 音频采样率 @property (nonatomic, assign, readonly) NSInteger audioSamplerate; /// 音频声道 @property (nonatomic, assign, readonly) NSInteger audioChannels; /// 音频码率 @property (nonatomic, assign, readonly) NSInteger audioBitrate; - (instancetype)initWithDictionary:(NSDictionary *)dictionary; @end
Swift
class PLVClientPushStreamTemplateAudioParams : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface PLVClientPushStreamTemplateVideoParams: NSObject /// 推流质量等级,唯一标识 @property (nonatomic, copy, readonly) NSString * qualityLevel; /// 推流质量名称 @property (nonatomic, copy, readonly) NSString * qualityName; /// 推流质量名称(英文名字段) @property (nonatomic, copy, readonly) NSString * qualityEnName; /// 视频分辨率 @property (nonatomic, assign, readonly) CGSize videoResolution; /// 视频码率 @property (nonatomic, assign, readonly) NSInteger videoBitrate; /// 视频采集帧率 @property (nonatomic, assign, readonly) NSInteger videoFrameRate; /// 视频关键帧帧率 @property (nonatomic, assign, readonly) NSInteger videoGop; /// 屏幕共享分辨率 @property (nonatomic, assign, readonly) CGSize screenResolution; /// 屏幕共享码率 @property (nonatomic, assign, readonly) NSInteger screenBitrate; /// 屏幕共享采集帧率 @property (nonatomic, assign, readonly) NSInteger screenFrameRate; /// 屏幕共享关键帧帧率 @property (nonatomic, assign, readonly) NSInteger screenGop; /// 是否支持此配置参数 @property (nonatomic, assign, readonly) BOOL isSupportVideoParams; - (instancetype)initWithDictionary:(NSDictionary *)dictionary; @end
Swift
class PLVClientPushStreamTemplateVideoParams : NSObject
-
更新连麦Token时所需的数据模型
See moreDeclaration
Objective-C
@interface PLVLinkMicGetTokenModel : NSObject
Swift
class PLVLinkMicGetTokenModel : NSObject
-
网络和性能的汇总统计指标
See moreDeclaration
Objective-C
@interface PLVRTCStatistics : NSObject
Swift
class PLVRTCStatistics : NSObject
-
连麦管理器
See moreDeclaration
Objective-C
@interface PLVLinkMicManager : NSObject
Swift
class PLVLinkMicManager : NSObject
-
RTC 推流管理器
See moreDeclaration
Objective-C
@interface PLVRTCStreamerManager : NSObject
Swift
class PLVRTCStreamerManager : NSObject
-
混流用户模型
See moreDeclaration
Objective-C
@interface PLVRTCStreamerMixUser : NSObject
Swift
class PLVRTCStreamerMixUser : NSObject
-
socket 管理类
See moreDeclaration
Objective-C
@interface PLVSocketManager : NSObject
Swift
class PLVSocketManager : NSObject
-
文档上传数据模型
See moreDeclaration
Objective-C
@interface PLVDocumentUploadModel : NSObject
Swift
class PLVDocumentUploadModel : NSObject
-
文档上传管理器
See moreDeclaration
Objective-C
@interface PLVDocumentUploadClient : NSObject
Swift
class PLVDocumentUploadClient : NSObject