Commit 95f1fd3e by zhangyunjie

2.5.9.6

parent 20eff474
...@@ -24,7 +24,13 @@ ...@@ -24,7 +24,13 @@
[self.window makeKeyAndVisible]; [self.window makeKeyAndVisible];
//启动SDK //启动SDK
[[OffcnLiveSDK defaultService] setupWithImageType:OffcnImageType_e60012 buttonType:OffcnButtonTypeRadius isTest:YES]; [[OffcnLiveSDK defaultService] setupWithAppUrlSchemes:@"zaixianketang" imageType:OffcnImageType_e60012 buttonType:OffcnButtonTypeRadius isTest:YES eventCallBack:^(OffcnSDKEvent event) {
if (event == OffcnSDKEventLookCourse) {
//查看课程
}
NSLog(@"eventCallBack:%lu",(unsigned long)event);
}];
return YES; return YES;
} }
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
[self.view endEditing:YES]; [self.view endEditing:YES];
[[OffcnLiveSDK defaultService] authWithNavigationController:self.navigationController VideoType:OffcnVideoTypeBigClassLive jumpMode:OffcnJumpModePush nickname:self.nameTextField.text password:self.koulingTextField.text uuid:self.uuidTextField.text hook:@"123" documentPath:@"123" extensionDic:[NSDictionary dictionaryWithObject:@"123" forKey:@"123"] playbackSeekTime:0]; [[OffcnLiveSDK defaultService] authWithNavigationController:self.navigationController VideoType:OffcnVideoTypeBigClassLive jumpMode:OffcnJumpModePush appName:@"zaixianketang" phone:@"18310564002" nickname:self.nameTextField.text password:self.koulingTextField.text uuid:self.uuidTextField.text hook:@"123" documentPath:@"123" extensionDic:[NSDictionary dictionaryWithObject:@"123" forKey:@"123"] playbackSeekTime:0];
//更换某个控件颜色 //更换某个控件颜色
// NSString *colorStr = @"#ff895f"; // NSString *colorStr = @"#ff895f";
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#pragma mark - 回放视频事件 #pragma mark - 回放视频事件
- (IBAction)playBackAction:(UIButton *)sender { - (IBAction)playBackAction:(UIButton *)sender {
[[OffcnLiveSDK defaultService] authWithNavigationController:self.navigationController VideoType:OffcnVideoTypeBigClassPlayback jumpMode:OffcnJumpModePush nickname:self.nameTextField.text password:self.koulingTextField.text uuid:self.uuidTextField.text hook:@"123" documentPath:@"123" extensionDic:[NSDictionary dictionaryWithObject:@"123" forKey:@"123"] playbackSeekTime:0]; [[OffcnLiveSDK defaultService] authWithNavigationController:self.navigationController VideoType:OffcnVideoTypeBigClassPlayback jumpMode:OffcnJumpModePush appName:@"zaixianketang" phone:@"18310564002" nickname:self.nameTextField.text password:self.koulingTextField.text uuid:self.uuidTextField.text hook:@"123" documentPath:@"123" extensionDic:[NSDictionary dictionaryWithObject:@"123" forKey:@"123"] playbackSeekTime:0];
} }
- (void)viewDidLoad { - (void)viewDidLoad {
......
...@@ -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.7.6' s.version = '2.5.9.6'
s.summary = 'OffcnLiveSDKiOS.' s.summary = 'OffcnLiveSDKiOS.'
s.description = <<-DESC s.description = <<-DESC
......
...@@ -7,9 +7,12 @@ ...@@ -7,9 +7,12 @@
// //
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
//#import "OffcnShareWindow.h" #import "OffcnShareWindow.h"
static const NSString *OffcnLiveSDKVersion = @"2.5.7.6"; static const NSString *OffcnLiveSDKVersion = @"2.5.9.6";
//事件通知
#define kOffcnEventNotification @"kOffcnEventNotification"
@interface OffcnPlaybackModel : NSObject @interface OffcnPlaybackModel : NSObject
//口令 //口令
...@@ -51,6 +54,10 @@ typedef NS_ENUM(NSUInteger, OffcnSDKReachabilityStatus) { ...@@ -51,6 +54,10 @@ typedef NS_ENUM(NSUInteger, OffcnSDKReachabilityStatus) {
OffcnSDKReachabilityStatusViaWiFi, OffcnSDKReachabilityStatusViaWiFi,
}; };
typedef NS_ENUM(NSUInteger, OffcnSDKEvent) {
OffcnSDKEventLookCourse = 1, //查看课程
};
//直播间退出房间后回调 //直播间退出房间后回调
typedef void(^liveQuitCallBack)(NSString *password); typedef void(^liveQuitCallBack)(NSString *password);
...@@ -67,6 +74,9 @@ typedef void(^playbackCallBack)(NSString *password, NSInteger recentlyWatchValue ...@@ -67,6 +74,9 @@ typedef void(^playbackCallBack)(NSString *password, NSInteger recentlyWatchValue
//网络监听回调 //网络监听回调
typedef void(^OffcnSDKReachabilityStatusCallBack)(OffcnSDKReachabilityStatus status); typedef void(^OffcnSDKReachabilityStatusCallBack)(OffcnSDKReachabilityStatus status);
//事件回调
typedef void(^OffcnSDKEventCallBack)(OffcnSDKEvent event);
@interface OffcnLiveSDK : NSObject @interface OffcnLiveSDK : NSObject
...@@ -78,7 +88,12 @@ typedef void(^OffcnSDKReachabilityStatusCallBack)(OffcnSDKReachabilityStatus sta ...@@ -78,7 +88,12 @@ typedef void(^OffcnSDKReachabilityStatusCallBack)(OffcnSDKReachabilityStatus sta
+ (OffcnLiveSDK *)defaultService; + (OffcnLiveSDK *)defaultService;
//共享窗口 //共享窗口
//@property (nonatomic,strong) OffcnShareWindow *shareWindow; @property (nonatomic, strong) OffcnShareWindow *shareWindow;
@property (nonatomic, assign) BOOL isSmallWindow;
@property (nonatomic, assign) CGRect shareWindowFrame;
@property (nonatomic, strong) UIWindow *KKeyWindow;//获取自定义window
@property (nonatomic, strong) UIWindow *oldKKeyWindow;//三方的window
@property (nonatomic, strong) UIViewController *shareVC;
//是否支持全屏 //是否支持全屏
@property (nonatomic, assign) BOOL isFull; @property (nonatomic, assign) BOOL isFull;
...@@ -97,6 +112,7 @@ typedef void(^OffcnSDKReachabilityStatusCallBack)(OffcnSDKReachabilityStatus sta ...@@ -97,6 +112,7 @@ typedef void(^OffcnSDKReachabilityStatusCallBack)(OffcnSDKReachabilityStatus sta
@property (nonatomic, assign) OffcnSDKReachabilityStatus OffcnReachabilityStatus; @property (nonatomic, assign) OffcnSDKReachabilityStatus OffcnReachabilityStatus;
@property (nonatomic, copy) OffcnSDKReachabilityStatusCallBack reachabilityStatusCallBack; @property (nonatomic, copy) OffcnSDKReachabilityStatusCallBack reachabilityStatusCallBack;
//是否选用测试环境 //是否选用测试环境
@property (nonatomic, assign) BOOL isTest; @property (nonatomic, assign) BOOL isTest;
//选用图片类型 //选用图片类型
...@@ -108,10 +124,12 @@ typedef void(^OffcnSDKReachabilityStatusCallBack)(OffcnSDKReachabilityStatus sta ...@@ -108,10 +124,12 @@ typedef void(^OffcnSDKReachabilityStatusCallBack)(OffcnSDKReachabilityStatus sta
/// 启动sdk /// 启动sdk
/// @param appUrlSchemes app设置的UrlSchemes
/// @param imageType 主色调类型 /// @param imageType 主色调类型
/// @param buttonType 按钮样式 /// @param buttonType 按钮样式
/// @param isTest 是否选用测试环境 /// @param isTest 是否选用测试环境
-(void)setupWithImageType:(OffcnImageType)imageType buttonType:(OffcnButtonType)buttonType isTest:(BOOL)isTest; /// @param callBack 事件回调
-(void)setupWithAppUrlSchemes:(NSString *)appUrlSchemes imageType:(OffcnImageType)imageType buttonType:(OffcnButtonType)buttonType isTest:(BOOL)isTest eventCallBack:(OffcnSDKEventCallBack)callBack;
/** /**
登录授权 登录授权
...@@ -119,6 +137,8 @@ typedef void(^OffcnSDKReachabilityStatusCallBack)(OffcnSDKReachabilityStatus sta ...@@ -119,6 +137,8 @@ typedef void(^OffcnSDKReachabilityStatusCallBack)(OffcnSDKReachabilityStatus sta
@param navigationController 导航控制器 @param navigationController 导航控制器
@param videoType 观看模式是:大班课直播/大班课回放/小班课直播(注:小班课目前只传OffcnVideoTypeSmallClassLive) @param videoType 观看模式是:大班课直播/大班课回放/小班课直播(注:小班课目前只传OffcnVideoTypeSmallClassLive)
@param jumpMode 跳转方式:Push/Present(注:小班课只传OffcnJumpModePresent) @param jumpMode 跳转方式:Push/Present(注:小班课只传OffcnJumpModePresent)
@param appName app名字拼音
@param phone 手机号
@param nickname 昵称 @param nickname 昵称
@param password 不同课程的学生口令 @param password 不同课程的学生口令
@param uuid 用户唯一标识码 @param uuid 用户唯一标识码
...@@ -130,6 +150,8 @@ typedef void(^OffcnSDKReachabilityStatusCallBack)(OffcnSDKReachabilityStatus sta ...@@ -130,6 +150,8 @@ typedef void(^OffcnSDKReachabilityStatusCallBack)(OffcnSDKReachabilityStatus sta
-(void)authWithNavigationController:(UINavigationController *)navigationController -(void)authWithNavigationController:(UINavigationController *)navigationController
VideoType:(OffcnVideoType)videoType VideoType:(OffcnVideoType)videoType
jumpMode:(OffcnJumpMode)jumpMode jumpMode:(OffcnJumpMode)jumpMode
appName:(NSString *)appName
phone:(NSString *)phone
nickname:(NSString *)nickname nickname:(NSString *)nickname
password:(NSString *)password password:(NSString *)password
uuid:(NSString *)uuid uuid:(NSString *)uuid
...@@ -141,6 +163,8 @@ typedef void(^OffcnSDKReachabilityStatusCallBack)(OffcnSDKReachabilityStatus sta ...@@ -141,6 +163,8 @@ typedef void(^OffcnSDKReachabilityStatusCallBack)(OffcnSDKReachabilityStatus sta
-(void)authWithNavigationController:(UINavigationController *)navigationController -(void)authWithNavigationController:(UINavigationController *)navigationController
VideoType:(OffcnVideoType)videoType VideoType:(OffcnVideoType)videoType
jumpMode:(OffcnJumpMode)jumpMode jumpMode:(OffcnJumpMode)jumpMode
appName:(NSString *)appName
phone:(NSString *)phone
nickname:(NSString *)nickname nickname:(NSString *)nickname
password:(NSString *)password password:(NSString *)password
uuid:(NSString *)uuid uuid:(NSString *)uuid
...@@ -151,7 +175,10 @@ typedef void(^OffcnSDKReachabilityStatusCallBack)(OffcnSDKReachabilityStatus sta ...@@ -151,7 +175,10 @@ typedef void(^OffcnSDKReachabilityStatusCallBack)(OffcnSDKReachabilityStatus sta
/** /**
* resignKeyWindow,并还原到上一次的keyWindow * resignKeyWindow,并还原到上一次的keyWindow
*/ */
//- (void)recoverLastKeyWindow; - (void)recoverLastKeyWindow;
//关闭小窗口
-(void)closeShareWindow;
//开启,关闭日志 //开启,关闭日志
-(void)setEnableLog:(BOOL)enable; -(void)setEnableLog:(BOOL)enable;
......
/*
* Copyright 2014 The WebRTC Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#import "RTCSessionDescription+JSON.h"
static NSString const *kRTCSessionDescriptionTypeKey = @"path";
static NSString const *kRTCSessionDescriptionSdpKey = @"sdp";
@implementation RTCSessionDescription (JSON)
+ (RTCSessionDescription *)descriptionFromJSONDictionary:
(NSDictionary *)dictionary {
NSString *typeString = dictionary[kRTCSessionDescriptionTypeKey];
//typeString = [typeString stringByReplacingOccurrencesOfString:@"rtcserver/" withString:@""];
RTCSdpType type = [[self class] typeForString:typeString];
NSString *sdp = dictionary[kRTCSessionDescriptionSdpKey];
return [[RTCSessionDescription alloc] initWithType:type sdp:sdp];
}
- (NSData *)JSONData {
NSString *type = [[self class] stringForType:self.type];
NSDictionary *json = @{
kRTCSessionDescriptionTypeKey : type,
kRTCSessionDescriptionSdpKey : self.sdp
};
return [NSJSONSerialization dataWithJSONObject:json options:0 error:nil];
}
@end
#import "RtcConnection.h"
@implementation RtcConnection
@end
...@@ -112,6 +112,9 @@ static const char *ZGWebrtcVersion = "0.1.20"; ...@@ -112,6 +112,9 @@ static const char *ZGWebrtcVersion = "0.1.20";
*/ */
- (void)stopPull:(NSString *)handleId streamID:(NSString *)streamID; - (void)stopPull:(NSString *)handleId streamID:(NSString *)streamID;
/// 是否正在推流
-(bool)isPushing;
/** /**
停止本地推流 停止本地推流
*/ */
......
#import "RtcHandle.h"
@implementation RtcHandle
@end
#import "RtcTransaction.h"
@implementation RtcTransaction
@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