Commit fa705ba6 by zhangyunjie

2.5.4.5北大

parent 374a5bb1
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'OffcnLiveSDKiOS' s.name = 'OffcnLiveSDKiOS'
s.version = '2.5.6.0' s.version = '2.5.4.5'
s.summary = 'OffcnLiveSDKiOS.' s.summary = 'OffcnLiveSDKiOS.'
s.description = <<-DESC s.description = <<-DESC
......
...@@ -35,10 +35,8 @@ typedef NS_ENUM(NSInteger, OffcnReachabilityStatus) { ...@@ -35,10 +35,8 @@ typedef NS_ENUM(NSInteger, OffcnReachabilityStatus) {
@property (nonatomic, copy) NSString *itemPath; @property (nonatomic, copy) NSString *itemPath;
//沙盒每个下载视频m3u8文件路径 //沙盒每个下载视频m3u8文件路径
@property (nonatomic, copy) NSString *itemM3U8Path; @property (nonatomic, copy) NSString *itemM3U8Path;
//沙盒每个下载视频教室聊天数据库地址 //沙盒每个下载视频聊天数据库地址
@property (nonatomic, copy) NSString *itemSqlitePath; @property (nonatomic, copy) NSString *itemSqlitePath;
//沙盒每个下载视频大厅聊天数据库地址
@property (nonatomic, copy) NSString *lobby_itemSqlitePath;
//沙盒每个下载视频公告数据库地址 //沙盒每个下载视频公告数据库地址
@property (nonatomic, copy) NSString *itemGongGaoSqlitePath; @property (nonatomic, copy) NSString *itemGongGaoSqlitePath;
...@@ -50,12 +48,8 @@ typedef NS_ENUM(NSInteger, OffcnReachabilityStatus) { ...@@ -50,12 +48,8 @@ typedef NS_ENUM(NSInteger, OffcnReachabilityStatus) {
@property (nonatomic, copy) NSString *flowUrlStr; @property (nonatomic, copy) NSString *flowUrlStr;
//流地址ts序号地址 //流地址ts序号地址
@property (nonatomic, copy) NSString *flowUrlPartStr; @property (nonatomic, copy) NSString *flowUrlPartStr;
//接口返回教室聊天数据库地址 //接口返回聊天数据库地址
@property (nonatomic, copy) NSString *sqlite; @property (nonatomic, copy) NSString *sqlite;
//接口返回大厅聊天数据库地址
@property (nonatomic, copy) NSString *lobby_timeChat;
//是否转推过:1是,0否
@property (nonatomic, assign) NSInteger is_turn_push;
//接口返回公告数据库地址 //接口返回公告数据库地址
@property (nonatomic, copy) NSString *timeAnnounce; @property (nonatomic, copy) NSString *timeAnnounce;
...@@ -91,10 +85,8 @@ typedef void(^stateCallBack)(NSString *password,OffcnDownloadState state,OffcnDo ...@@ -91,10 +85,8 @@ typedef void(^stateCallBack)(NSString *password,OffcnDownloadState state,OffcnDo
//网络监测 //网络监测
typedef void(^reachabilityStatusCallBack)(OffcnReachabilityStatus status); typedef void(^reachabilityStatusCallBack)(OffcnReachabilityStatus status);
//下载教室聊天数据库状态 //下载聊天数据库状态
typedef void(^downloadChatDatabaseCallBack)(BOOL isSuccess, NSError *error); typedef void(^downloadChatDatabaseCallBack)(BOOL isSuccess, NSError *error);
//下载大厅聊天数据库状态
typedef void(^downloadHallChatDatabaseCallBack)(BOOL isSuccess, NSError *error);
//下载公告数据库状态 //下载公告数据库状态
typedef void(^downloadGongGaoDatabaseCallBack)(BOOL isSuccess, NSError *error); typedef void(^downloadGongGaoDatabaseCallBack)(BOOL isSuccess, NSError *error);
...@@ -118,11 +110,8 @@ typedef void(^downloadGongGaoDatabaseCallBack)(BOOL isSuccess, NSError *error); ...@@ -118,11 +110,8 @@ typedef void(^downloadGongGaoDatabaseCallBack)(BOOL isSuccess, NSError *error);
//网络监测到使用手机流量提醒回调 //网络监测到使用手机流量提醒回调
@property (nonatomic, copy) reachabilityStatusCallBack reachabilitystatusCallBack; @property (nonatomic, copy) reachabilityStatusCallBack reachabilitystatusCallBack;
//下载教室聊天数据库状态 //下载聊天数据库状态
@property (nonatomic, copy) downloadChatDatabaseCallBack downloadchatDatabaseCallBack; @property (nonatomic, copy) downloadChatDatabaseCallBack downloadchatDatabaseCallBack;
//下载大厅聊天数据库状态
@property (nonatomic, copy) downloadHallChatDatabaseCallBack downloadHallchatDatabaseCallBack;
//下载公告数据库状态 //下载公告数据库状态
@property (nonatomic, copy) downloadGongGaoDatabaseCallBack downloadgonggaoDatabaseCallBack; @property (nonatomic, copy) downloadGongGaoDatabaseCallBack downloadgonggaoDatabaseCallBack;
...@@ -146,20 +135,13 @@ typedef void(^downloadGongGaoDatabaseCallBack)(BOOL isSuccess, NSError *error); ...@@ -146,20 +135,13 @@ typedef void(^downloadGongGaoDatabaseCallBack)(BOOL isSuccess, NSError *error);
- (void)downloadDataWithPassword:(NSString *)password hook:(NSString *)hook documentPath:(NSString *)documentPath downloadState:(OffcnDownloadState)downloadState extensionDic:(NSDictionary *)extensionDic; - (void)downloadDataWithPassword:(NSString *)password hook:(NSString *)hook documentPath:(NSString *)documentPath downloadState:(OffcnDownloadState)downloadState extensionDic:(NSDictionary *)extensionDic;
/** /**
在线看回放只下载教室聊天数据库 在线看回放只下载聊天数据库
@param model model @param model model
*/ */
- (void)downloadChatDatabaseWithModel:(OffcnDownloadManagerModel *)model; - (void)downloadChatDatabaseWithModel:(OffcnDownloadManagerModel *)model;
/** /**
在线看回放只下载大厅聊天数据库
@param model model
*/
- (void)downloadHallChatDatabaseWithModel:(OffcnDownloadManagerModel *)model;
/**
在线看回放只下载公告数据库 在线看回放只下载公告数据库
@param model model @param model model
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
//#import "OffcnShareWindow.h" //#import "OffcnShareWindow.h"
static const NSString *OffcnLiveSDKVersion = @"2.5.6.0"; static const NSString *OffcnLiveSDKVersion = @"2.5.4.5";
@interface OffcnPlaybackModel : NSObject @interface OffcnPlaybackModel : NSObject
//口令 //口令
...@@ -22,6 +22,12 @@ static const NSString *OffcnLiveSDKVersion = @"2.5.6.0"; ...@@ -22,6 +22,12 @@ static const NSString *OffcnLiveSDKVersion = @"2.5.6.0";
@property (nonatomic, assign) NSInteger totalSeconds; @property (nonatomic, assign) NSInteger totalSeconds;
@end @end
typedef NS_ENUM(NSUInteger, OffcnImageType) {
OffcnImageTypeZhongGong = 1, //默认
OffcnImageTypeBeiDa, //北大适配图片
};
typedef NS_ENUM(NSUInteger, OffcnVideoType) { typedef NS_ENUM(NSUInteger, OffcnVideoType) {
OffcnVideoTypeBigClassLive = 1, //大班课直播 OffcnVideoTypeBigClassLive = 1, //大班课直播
OffcnVideoTypeBigClassPlayback, //大班课回放 OffcnVideoTypeBigClassPlayback, //大班课回放
...@@ -34,12 +40,6 @@ typedef NS_ENUM(NSUInteger, OffcnJumpMode) { ...@@ -34,12 +40,6 @@ typedef NS_ENUM(NSUInteger, OffcnJumpMode) {
OffcnJumpModePresent, OffcnJumpModePresent,
}; };
typedef NS_ENUM(NSUInteger, OffcnSDKReachabilityStatus) {
OffcnSDKReachabilityStatusNotReachable = 0,
OffcnSDKReachabilityStatusViaWWAN,
OffcnSDKReachabilityStatusViaWiFi,
};
//直播间退出房间后回调 //直播间退出房间后回调
typedef void(^liveQuitCallBack)(NSString *password); typedef void(^liveQuitCallBack)(NSString *password);
...@@ -53,9 +53,6 @@ typedef void(^liveQuitCallBack)(NSString *password); ...@@ -53,9 +53,6 @@ typedef void(^liveQuitCallBack)(NSString *password);
*/ */
typedef void(^playbackCallBack)(NSString *password, NSInteger recentlyWatchValue, CGFloat maxWatchValue, NSInteger totalValue); typedef void(^playbackCallBack)(NSString *password, NSInteger recentlyWatchValue, CGFloat maxWatchValue, NSInteger totalValue);
//网络监听回调
typedef void(^OffcnSDKReachabilityStatusCallBack)(OffcnSDKReachabilityStatus status);
@interface OffcnLiveSDK : NSObject @interface OffcnLiveSDK : NSObject
...@@ -66,21 +63,21 @@ typedef void(^OffcnSDKReachabilityStatusCallBack)(OffcnSDKReachabilityStatus sta ...@@ -66,21 +63,21 @@ typedef void(^OffcnSDKReachabilityStatusCallBack)(OffcnSDKReachabilityStatus sta
*/ */
+ (OffcnLiveSDK *)defaultService; + (OffcnLiveSDK *)defaultService;
/** //共享窗口
共享窗口
*/
//@property (nonatomic,strong) OffcnShareWindow *shareWindow; //@property (nonatomic,strong) OffcnShareWindow *shareWindow;
/** //是否支持全屏
是否支持全屏
*/
@property (nonatomic, assign) BOOL isFull; @property (nonatomic, assign) BOOL isFull;
@property (nonatomic, assign) OffcnVideoType videoType; @property (nonatomic, assign) OffcnVideoType videoType;
/**
是否选用测试环境 //是否选用测试环境
*/
@property (nonatomic, assign) BOOL isTest; @property (nonatomic, assign) BOOL isTest;
//选用图片类型
@property (nonatomic, assign) OffcnImageType imageType;
//设置选中颜色
+(void)colorFromHex:(NSString *)hex alpha:(CGFloat)alpha;
//直播间退出房间后回调 //直播间退出房间后回调
@property (nonatomic, copy) liveQuitCallBack offcnLiveQuitCallBack; @property (nonatomic, copy) liveQuitCallBack offcnLiveQuitCallBack;
...@@ -91,13 +88,10 @@ typedef void(^OffcnSDKReachabilityStatusCallBack)(OffcnSDKReachabilityStatus sta ...@@ -91,13 +88,10 @@ typedef void(^OffcnSDKReachabilityStatusCallBack)(OffcnSDKReachabilityStatus sta
//回放观看过程中进度model(只在观看过程中有数据,退出房间后就被清空了) //回放观看过程中进度model(只在观看过程中有数据,退出房间后就被清空了)
@property (nonatomic, strong) OffcnPlaybackModel *playbackModel; @property (nonatomic, strong) OffcnPlaybackModel *playbackModel;
//设置选中颜色,例如#9b0000
-(void)colorWithCustomColorStr:(NSString *)colorStr alpha:(CGFloat)alpha;
@property (nonatomic, assign) OffcnSDKReachabilityStatus OffcnReachabilityStatus; //获取网络状态和内部初始化处理
@property (nonatomic, copy) OffcnSDKReachabilityStatusCallBack reachabilityStatusCallBack;
/**
使用RealReachability监听网络状态上传用户观看进度统计数据和获取敏感词
*/
-(void)startNotifierUseRealReachability; -(void)startNotifierUseRealReachability;
/** /**
...@@ -140,12 +134,6 @@ typedef void(^OffcnSDKReachabilityStatusCallBack)(OffcnSDKReachabilityStatus sta ...@@ -140,12 +134,6 @@ typedef void(^OffcnSDKReachabilityStatusCallBack)(OffcnSDKReachabilityStatus sta
*/ */
//- (void)recoverLastKeyWindow; //- (void)recoverLastKeyWindow;
//开启,关闭日志
-(void)setEnableLog:(BOOL)enable;
//*********************注:以下替换颜色接口已废,不再支持*********************
/** /**
tab(聊天,提问板,资料)普通颜色 tab(聊天,提问板,资料)普通颜色
*/ */
......
//
// OffcnSmallClassSDK.h
// OffcnLiveSDK
//
// Created by vockey on 2020/7/2.
// Copyright © 2020 中公教育. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
//事件回调枚举
typedef NS_ENUM(NSUInteger, OffcnSmallClassSDKEvent) {
OffcnSmallClassSDKEventUserLogin = 1, //用户登录事件回调
OffcnSmallClassSDKEventUserLogout, //用户退出事件回调
OffcnSmallClassSDKEventJoin, //加入会话事件回调
OffcnSmallClassSDKEventPush, //上台事件回调
OffcnSmallClassSDKEventPub, //用户上台连麦(包含自己)事件回调
OffcnSmallClassSDKEventUnPub, //用户下台断麦(包含自己)事件回调
OffcnSmallClassSDKEventSub, //拉流成功事件回调
OffcnSmallClassSDKEventMuteRemoteAudio, //停止,恢复接受指定音频流事件回调
OffcnSmallClassSDKEventMuteRemoteVideo, //停止,恢复接受指定视频流事件回调
OffcnSmallClassSDKEventStartPreview, //开启视频预览事件回调
OffcnSmallClassSDKEventConnect, //长连接状态事件回调
OffcnSmallClassSDKEventOnlineNumberUpdate, //房间实时人数变更事件回调
OffcnSmallClassSDKEventEquipmentUpdate, //用户设备状态改变回调
OffcnSmallClassSDKEventEndRoom, //结束课程回调
OffcnSmallClassSDKEventVideoStatusDenied, //没有相机权限回调
OffcnSmallClassSDKEventAudioStatusDenied, //没有麦克风权限回调
};
//事件回调返回的数据模型
@interface OffcnSmallClassSDKResponseModel : NSObject
//是否成功
@property (nonatomic,assign) BOOL isSuccess;
//昵称
@property (nonatomic,copy) NSString *nickname;
//uuid
@property (nonatomic,copy) NSString *uuid;
//上台成功返回视频渲染视图
@property (nonatomic,strong) UIView *renderView;
//错误码
@property (nonatomic,assign) NSInteger code;
//返回的错误信息
@property (nonatomic,copy) NSString *errorMessage;
//返回的原内容
@property (nonatomic) id responseObject;
-(instancetype)initWithResponseObject:(id)responseObject;
@end
@protocol OffcnSmallClassSDKDelegate <NSObject>
//事件回调
-(void)offcnSmallClassSDKEvent:(OffcnSmallClassSDKEvent)event responseModel:(OffcnSmallClassSDKResponseModel *)responseModel;
@optional
//音量大小回调
-(void)volumeChangedWithUUID:(NSString *)uuid value:(unsigned short)value;
//视图size变化
-(void)renderViewSizeChangedWithUUID:(NSString *)uuid size:(CGSize)size;
@end
@interface OffcnSmallClassSDK : NSObject
@property(nonatomic, weak) id<OffcnSmallClassSDKDelegate> delegate;
//在线人数
@property (nonatomic, copy) NSString *online_num;
//房间允许最大推流人数
@property (nonatomic, assign) NSInteger max_push;
//所有用户设备状态
@property (nonatomic, strong) NSMutableDictionary *userEquipmentDic;
//创建直播单例服务
+(OffcnSmallClassSDK *)defaultService;
//登陆房间
-(void)loginWithUUID:(NSString *)uuid userName:(NSString *)userName password:(NSString *)password extensionDic:(NSDictionary *)extensionDic;
//退出房间
-(void)leaveRoom;
//加入会话
-(void)join;
//退出会话
-(void)unjoin;
//设置是否默认接收音频流
-(void)setDefaultMuteAllRemoteAudioStreams:(BOOL)mute;
//设置是否默认接收视频流
-(void)setDefaultMuteAllRemoteVideoStreams:(BOOL)mute;
//推流上台
-(void)push;
//断流下台
-(void)unpush;
//订阅指定流
-(void)subWithUUID:(NSString *)uuid;
//解除订阅指定流
-(void)unsubWithUUID:(NSString *)uuid;
//开启视频预览
-(void)startPreview;
//停止视频预览
-(void)stopPreview;
//切换前置、后置摄像头
-(void)switchCamera;
//开,关本地音频采集
-(void)enableLocalAudio:(BOOL)enable;
//停止,恢复发送本地音频流
-(void)muteLocalAudioStream:(BOOL)mute;
//停止,恢复接受指定音频流
-(void)muteRemoteAudioStream:(NSString *)uuid mute:(BOOL)mute;
//停止,接收所有远端音频流
-(void)muteAllRemoteAudioStreams:(BOOL)mute;
//开,关本地视频采集
-(void)enableLocalVideo:(BOOL)enable;
//停止,恢复发送本地视频流
-(void)muteLocalVideoStream:(BOOL)mute;
//停止,恢复接受指定视频流
-(void)muteRemoteVideoStream:(NSString *)uuid mute:(BOOL)mute;
//停止,接收所有远端视频流
-(void)muteAllRemoteVideoStreams:(BOOL)mute;
@end
NS_ASSUME_NONNULL_END
//
// OffcnSmallClassSDKModel.h
// OffcnLiveSDK
//
// Created by vockey on 2020/7/14.
// Copyright © 2020 中公教育. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface OffcnSmallClassSDKEquipmentModel : NSObject
@property (nonatomic, copy) NSString *userID;
@property (nonatomic, assign) BOOL cameraEnabled;
@property (nonatomic, assign) BOOL microphoneEnabled;
@end
NS_ASSUME_NONNULL_END
//
// OffcnVideoView.h
// OffcnLiveSDK
//
// Created by vockey on 2020/7/16.
// Copyright © 2020 中公教育. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef void(^recentlyWatchCallBack)(NSInteger recentlyWatchValue, NSInteger totalValue);
//窗口旋转回调
typedef void(^windowRotationCallBack)(UIInterfaceOrientation interfaceOrientation);
@interface OffcnVideoView : UIView
@property (nonatomic, assign) BOOL isDefaultPlay;//默认是否播放
@property (nonatomic, assign) BOOL isHiddenReturnBtn;//是否隐藏返回按钮
@property (nonatomic, assign) BOOL isHiddenTitle;//是否隐藏标题
@property (nonatomic, assign) BOOL isHiddenNavTool;//是否隐藏顶部工具栏
@property (nonatomic, assign) BOOL isHiddenTabTool;//是否隐藏底部工具栏
//回放开始的时间,单位:秒,默认从0秒开始,根据需求是否从上次观看记录的位置开始播放,如果没有上次观看记录的位置请传0
@property (nonatomic, assign) NSTimeInterval seekTime;
@property (nonatomic, copy) NSString *titleStr;//标题
@property (nonatomic, assign) BOOL isMusic;//是否纯音乐类型,例如MP4
@property (nonatomic, strong) UIImageView *musicImage;//播放音乐背景
//设置播放地址和解密密HLS需要的Key
@property (nonatomic, copy) NSString *rtmlStr;//播放地址
@property (nonatomic, copy) NSString *keyStr;//没有加密的视频不用传
@property (nonatomic, copy) recentlyWatchCallBack recentlyWatchCallBack;//回放观看进度回调
@property (nonatomic, assign) UIInterfaceOrientation interfaceOrientation;//竖横屏
@property (nonatomic, copy) windowRotationCallBack windowRotationCallBack;//窗口旋转回调
@property (nonatomic, copy) void(^returnBtnActionCallBack)(UIInterfaceOrientation interfaceOrientation, NSInteger recentlyWatchValue, NSInteger totalValue);//返回按钮回调
@end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment