Commit 43f9fa05 authored by Hanruisong's avatar Hanruisong
Browse files

feat: 更新到4.12.0

1.支持防拖拽功能。
2.锁屏逻辑优化。
3.修复某些设备下投屏异常的问题。
4.SDK下载模块优化,提高稳定性。
parent ad76c112
......@@ -407,12 +407,12 @@
DD54280B250B55AB0097614C /* icon_ad_mute@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = DD542807250B55AB0097614C /* icon_ad_mute@3x.png */; };
DD54280C250B55AB0097614C /* icon_ad_mute@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DD542808250B55AB0097614C /* icon_ad_mute@2x.png */; };
DD54280D250B55AB0097614C /* icon_ad_mute_select@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = DD542809250B55AB0097614C /* icon_ad_mute_select@3x.png */; };
DD81DFDA2587129C00F83CCC /* DWResource.bundle in Resources */ = {isa = PBXBuildFile; fileRef = DD81DFD82587129C00F83CCC /* DWResource.bundle */; };
DD81DFDB2587129C00F83CCC /* vrlibraw.bundle in Resources */ = {isa = PBXBuildFile; fileRef = DD81DFD92587129C00F83CCC /* vrlibraw.bundle */; };
DD81DFDC2587141000F83CCC /* HDBaseUtils.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD81DFD42587126600F83CCC /* HDBaseUtils.framework */; };
DD81DFDD2587141000F83CCC /* HDBaseUtils.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DD81DFD42587126600F83CCC /* HDBaseUtils.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DD81DFDE2587141500F83CCC /* CCVodSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD81DFD32587126600F83CCC /* CCVodSDK.framework */; };
DD81DFDF2587141500F83CCC /* CCVodSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DD81DFD32587126600F83CCC /* CCVodSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DD89BEB025AC266C0000B315 /* DWResource.bundle in Resources */ = {isa = PBXBuildFile; fileRef = DD89BEAE25AC266C0000B315 /* DWResource.bundle */; };
DD89BEB125AC266C0000B315 /* vrlibraw.bundle in Resources */ = {isa = PBXBuildFile; fileRef = DD89BEAF25AC266C0000B315 /* vrlibraw.bundle */; };
DD89BEB225AC26730000B315 /* CCVodSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD89BEA925AC26340000B315 /* CCVodSDK.framework */; };
DD89BEB325AC26740000B315 /* CCVodSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DD89BEA925AC26340000B315 /* CCVodSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DD89BEB425AC26770000B315 /* HDBaseUtils.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD89BEAA25AC26340000B315 /* HDBaseUtils.framework */; };
DD89BEB525AC26770000B315 /* HDBaseUtils.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DD89BEAA25AC26340000B315 /* HDBaseUtils.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
......@@ -422,8 +422,8 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
DD81DFDD2587141000F83CCC /* HDBaseUtils.framework in Embed Frameworks */,
DD81DFDF2587141500F83CCC /* CCVodSDK.framework in Embed Frameworks */,
DD89BEB325AC26740000B315 /* CCVodSDK.framework in Embed Frameworks */,
DD89BEB525AC26770000B315 /* HDBaseUtils.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
......@@ -993,10 +993,10 @@
DD542807250B55AB0097614C /* icon_ad_mute@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_ad_mute@3x.png"; sourceTree = "<group>"; };
DD542808250B55AB0097614C /* icon_ad_mute@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_ad_mute@2x.png"; sourceTree = "<group>"; };
DD542809250B55AB0097614C /* icon_ad_mute_select@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_ad_mute_select@3x.png"; sourceTree = "<group>"; };
DD81DFD32587126600F83CCC /* CCVodSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CCVodSDK.framework; sourceTree = "<group>"; };
DD81DFD42587126600F83CCC /* HDBaseUtils.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = HDBaseUtils.framework; sourceTree = "<group>"; };
DD81DFD82587129C00F83CCC /* DWResource.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = DWResource.bundle; path = CCVodSDK.framework/DWResource.bundle; sourceTree = "<group>"; };
DD81DFD92587129C00F83CCC /* vrlibraw.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = vrlibraw.bundle; path = CCVodSDK.framework/vrlibraw.bundle; sourceTree = "<group>"; };
DD89BEA925AC26340000B315 /* CCVodSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CCVodSDK.framework; sourceTree = "<group>"; };
DD89BEAA25AC26340000B315 /* HDBaseUtils.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = HDBaseUtils.framework; sourceTree = "<group>"; };
DD89BEAE25AC266C0000B315 /* DWResource.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = DWResource.bundle; path = CCVodSDK.framework/DWResource.bundle; sourceTree = "<group>"; };
DD89BEAF25AC266C0000B315 /* vrlibraw.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = vrlibraw.bundle; path = CCVodSDK.framework/vrlibraw.bundle; sourceTree = "<group>"; };
DDF1A579255E8A52007EE8B9 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */
......@@ -1005,14 +1005,14 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
DD81DFDC2587141000F83CCC /* HDBaseUtils.framework in Frameworks */,
DD89BEB425AC26770000B315 /* HDBaseUtils.framework in Frameworks */,
048AD12822CDCE83008C8911 /* libxml2.tbd in Frameworks */,
043441FF225EF2BB003F7EC1 /* CoreServices.framework in Frameworks */,
352CBDD91FD6980C00D24715 /* AudioToolbox.framework in Frameworks */,
352CBDD71FD697E800D24715 /* MediaPlayer.framework in Frameworks */,
B88562A41DED1AC8008D1763 /* SystemConfiguration.framework in Frameworks */,
B57CC7C018E2E581001A1696 /* AVFoundation.framework in Frameworks */,
DD81DFDE2587141500F83CCC /* CCVodSDK.framework in Frameworks */,
DD89BEB225AC26730000B315 /* CCVodSDK.framework in Frameworks */,
B57CC7BE18E2E575001A1696 /* CoreLocation.framework in Frameworks */,
B57CC7BC18E2E569001A1696 /* CoreMedia.framework in Frameworks */,
B547EC4C18E033FB00BC980C /* CoreGraphics.framework in Frameworks */,
......@@ -1847,7 +1847,7 @@
isa = PBXGroup;
children = (
044C66A122D46DAE0032396F /* Demo.entitlements */,
DD81DFD22587126600F83CCC /* SDK */,
DD89BEA825AC26340000B315 /* SDK */,
0434420D225F0EDD003F7EC1 /* Classes */,
B547EC5818E033FB00BC980C /* DWAppDelegate.h */,
B547EC5918E033FB00BC980C /* DWAppDelegate.m */,
......@@ -1874,13 +1874,13 @@
name = "Supporting Files";
sourceTree = "<group>";
};
DD81DFD22587126600F83CCC /* SDK */ = {
DD89BEA825AC26340000B315 /* SDK */ = {
isa = PBXGroup;
children = (
DD81DFD82587129C00F83CCC /* DWResource.bundle */,
DD81DFD92587129C00F83CCC /* vrlibraw.bundle */,
DD81DFD32587126600F83CCC /* CCVodSDK.framework */,
DD81DFD42587126600F83CCC /* HDBaseUtils.framework */,
DD89BEAE25AC266C0000B315 /* DWResource.bundle */,
DD89BEAF25AC266C0000B315 /* vrlibraw.bundle */,
DD89BEA925AC26340000B315 /* CCVodSDK.framework */,
DD89BEAA25AC26340000B315 /* HDBaseUtils.framework */,
);
path = SDK;
sourceTree = "<group>";
......@@ -1896,7 +1896,7 @@
B547EC4318E033FB00BC980C /* Frameworks */,
B547EC4418E033FB00BC980C /* Resources */,
DD0F24D3255E22B000DA2705 /* Embed Frameworks */,
DD81DFD72587128B00F83CCC /* ShellScript */,
DD89BEAD25AC26580000B315 /* ShellScript */,
);
buildRules = (
);
......@@ -2056,7 +2056,7 @@
04AB4A3722B1F22A00BB9BF9 /* icon_exercises_error@2x.png in Resources */,
04D60ED822719B9C0009C572 /* icon_play_vr_inselect_select@2x.png in Resources */,
043D4E6B22D5C91D00FCDCBE /* icon_sound_add@2x.png in Resources */,
DD81DFDA2587129C00F83CCC /* DWResource.bundle in Resources */,
DD89BEB025AC266C0000B315 /* DWResource.bundle in Resources */,
04346AC8249720C6005A3396 /* icon_screenshot@2x.png in Resources */,
04B7A661226B0E5E00951983 /* icon_question_multi_select@3x.png in Resources */,
04AB4A3F22B1F22A00BB9BF9 /* icon_exercises_answer_d_select@2x.png in Resources */,
......@@ -2154,7 +2154,7 @@
04346AC0249720C6005A3396 /* brightness.png in Resources */,
04B7A65F226B0E5E00951983 /* icon_question_single_select@2x.png in Resources */,
0491DD1F24B5604300DF40C7 /* icon_barrage_color_select@3x.png in Resources */,
DD81DFDB2587129C00F83CCC /* vrlibraw.bundle in Resources */,
DD89BEB125AC266C0000B315 /* vrlibraw.bundle in Resources */,
04BAA93D22D4787B000495B4 /* icon_screen_list@2x.png in Resources */,
04AB4A2622B1F22A00BB9BF9 /* icon_exercises_answer_g_normal@2x.png in Resources */,
04B7A65C226B0E5E00951983 /* icon_question_multi_select@2x.png in Resources */,
......@@ -2204,7 +2204,7 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
DD81DFD72587128B00F83CCC /* ShellScript */ = {
DD89BEAD25AC26580000B315 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
......
......@@ -89,6 +89,7 @@
}];
[task resume];
}
-(void)reloadLoaclData
......
......@@ -33,6 +33,8 @@ typedef enum : NSUInteger {
@property(nonatomic,strong)DWScreeningBgView * screenBgView;//投屏控制器
@property(nonatomic,assign)BOOL isLock;
@end
@implementation DWVodPlayViewController
......@@ -41,7 +43,6 @@ typedef enum : NSUInteger {
[super viewDidLoad];
// Do any additional setup after loading the view.
[self initParams];
[self initUI];
......@@ -207,6 +208,10 @@ typedef enum : NSUInteger {
#pragma mark - notification
-(void)deviceOrientationChangeNotification
{
if (self.isLock) {
return;
}
UIDeviceOrientation orientation = [UIDevice currentDevice].orientation;
UIInterfaceOrientation interfaceOrientation = (UIInterfaceOrientation)orientation;
......@@ -296,6 +301,8 @@ typedef enum : NSUInteger {
//选集选择事件
-(void)vodPlayerView:(DWVodPlayerView *)playerView ChooseSelection:(NSInteger)selectionIndex
{
[self.playerView saveSliderSchedule];
DWVodModel * vodModel = [self.vidoeList objectAtIndex:selectionIndex];
self.vodModel = vodModel;
[self startRequestVideo:self.vodModel.videoId];
......@@ -372,6 +379,12 @@ typedef enum : NSUInteger {
[self startRequestAdInfo:3];
}
//锁屏事件
-(void)vodPlayerViewLockScreen:(BOOL)isLock
{
self.isLock = isLock;
}
#pragma mark - 投屏相关
-(void)screeningReturnButtonAction
{
......@@ -395,7 +408,8 @@ typedef enum : NSUInteger {
-(void)screeningBgViewCloseAction
{
self.playerView.isScreening = NO;
dispatch_async(dispatch_get_main_queue(), ^{
[self.screenBgView removeFromSuperview];
self.screenBgView = nil;
......@@ -448,6 +462,8 @@ typedef enum : NSUInteger {
[self.adShowView adFinish];
}
self.playerView.isShowAd = NO;
[self.playerView saveSliderSchedule];
self.vodModel = vodModel;
DWConfigurationManager * manager = [DWConfigurationManager sharedInstance];
......@@ -579,6 +595,7 @@ typedef enum : NSUInteger {
-(void)initParams
{
self.cellStyle = DWVodPlayTableViewCellStyleDefault;
self.isLock = NO;
}
-(void)initUI
......@@ -669,7 +686,8 @@ typedef enum : NSUInteger {
-(BOOL)shouldAutorotate
{
return YES;
return !self.isLock;
// return YES;
}
/*
......
......@@ -32,6 +32,8 @@ NS_ASSUME_NONNULL_BEGIN
-(void)vodPlayerViewDidEnterWindowsModel:(DWVodPlayerView *)playerView;
//片尾广告事件
-(void)vodPlayerViewEndAd:(DWVodPlayerView *)playerView;
//锁屏事件
-(void)vodPlayerViewLockScreen:(BOOL)isLock;
@end
......@@ -89,6 +91,9 @@ NS_ASSUME_NONNULL_BEGIN
//播放下一集
-(void)playNextVideo;
//切换视频,保存已看进度
-(void)saveSliderSchedule;
@end
NS_ASSUME_NONNULL_END
......@@ -54,6 +54,9 @@
@property(nonatomic,strong)UIButton * windowsPlayOrPauseButton;
@property(nonatomic,strong)UIButton * windowsResumeButton;
@property(nonatomic,assign)BOOL allowSlider;//是否开启防拖拽,默认关闭
@property(nonatomic,assign)CGFloat sliderTime;//禁止拖拽时间
//是否加载完毕
@property(nonatomic,assign)BOOL readyToPlay;
......@@ -251,6 +254,10 @@ static CGFloat barrageBgHeight = 40;
//是否开启画中画
self.allowPictureInPicture = NO;
//是否开启防拖拽功能,默认关闭
self.allowSlider = NO;
self.sliderTime = 0;
self.isShowAd = NO;
self.allowImpact = [[[NSUserDefaults standardUserDefaults] objectForKey:@"allowImpact"] boolValue];
......@@ -510,6 +517,12 @@ static CGFloat barrageBgHeight = 40;
[self nextButtonAction];
}
//切换视频,保存已看进度
-(void)saveSliderSchedule
{
[self writeSliderWithVideoID:self.vodModel.videoId];
}
#pragma mark - function
//保存videoModel ,并对打点,问答,字幕等功能数据进行处理
-(void)setVideoModel:(DWVodVideoModel *)videoModel
......@@ -625,7 +638,6 @@ static CGFloat barrageBgHeight = 40;
[_disableGesButton mas_updateConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(@10);
}];
}
if (interfaceOrientation == UIInterfaceOrientationLandscapeRight) {
......@@ -642,7 +654,6 @@ static CGFloat barrageBgHeight = 40;
[_disableGesButton mas_updateConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(@(self.areaInsets.left));
}];
}
[self.currentLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
......@@ -1239,10 +1250,17 @@ static CGFloat barrageBgHeight = 40;
self.isSlidering = NO;
return;
}
CGFloat durationInSeconds = CMTimeGetSeconds(self.playerView.player.currentItem.duration);
CGFloat time = durationInSeconds * value;
//主要逻辑在这里处理
if (self.allowSlider) {
if (time > self.sliderTime) {
time = self.sliderTime;
}
}
//授权验证功能
if (!self.enable) {
NSInteger freetime = self.videoModel.authorize.freetime;
......@@ -1282,6 +1300,67 @@ static CGFloat barrageBgHeight = 40;
}];
}
-(void)writeSliderWithVideoID:(NSString *)videoID
{
if (!videoID) {
return;
}
if (!self.allowSlider) {
return;
}
NSMutableDictionary * infoDict;
if ([[NSUserDefaults standardUserDefaults] objectForKey:DWVIDEOPLAYSCHEDULE]) {
infoDict = [[[NSUserDefaults standardUserDefaults] objectForKey:DWVIDEOPLAYSCHEDULE] mutableCopy];
}else{
infoDict = [[NSMutableDictionary alloc]init];
}
[infoDict setObject:@(self.sliderTime) forKey:videoID];
[[NSUserDefaults standardUserDefaults] setObject:infoDict forKey:DWVIDEOPLAYSCHEDULE];
[[NSUserDefaults standardUserDefaults] synchronize];
}
-(CGFloat)readSliderWithVideoID:(NSString *)videoID
{
if (!videoID) {
return 0;
}
if (!self.allowSlider) {
return 0;
}
//取记忆播放的时间点
NSUserDefaults * userDefaults = [NSUserDefaults standardUserDefaults];
NSMutableDictionary * infoDict = [[NSUserDefaults standardUserDefaults] objectForKey:DWVIDEOPLAYSCHEDULE];
if (![infoDict objectForKey:videoID]) {
return 0;
}
CGFloat sliderTime = [[infoDict objectForKey:videoID] floatValue];
if (sliderTime == 0) {
//取记忆播放位置
CGFloat playTime = 0;
id saveTime = nil;
if (self.videoModel) {
saveTime = [userDefaults objectForKey:self.videoModel.videoId];
}else{
saveTime = [userDefaults objectForKey:self.downloadModel.filePath];
}
if ([saveTime isKindOfClass:[NSDictionary class]]) {
//旧版本存储的播放数据
playTime = [[saveTime objectForKey:@"playbackTime"] floatValue];
}else{
playTime = [saveTime floatValue];
}
sliderTime = playTime;
}
return sliderTime;
}
#pragma mark - func Timer
-(void)initFuncGesture
......@@ -1350,8 +1429,9 @@ static CGFloat barrageBgHeight = 40;
UIDeviceOrientation orientation = [UIDevice currentDevice].orientation;
UIInterfaceOrientation interfaceOrientation = (UIInterfaceOrientation)orientation;
if (self.isLock) {
[_topFuncBgView mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(@(-topHeight));
make.height.equalTo(@(topHeight));
......@@ -1362,6 +1442,29 @@ static CGFloat barrageBgHeight = 40;
make.height.equalTo(@(bottomHeight));
}];
/*
[self addSubview:self.gifButton];
[_gifButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@(self.areaInsets.right));
make.centerY.equalTo(self).offset(24);
make.width.and.height.equalTo(@30);
}];
[self addSubview:self.disableGesButton];
[_disableGesButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(@(self.areaInsets.left));
make.centerY.equalTo(self);
make.width.and.height.equalTo(@30);
}];
[self addSubview:self.screenShotButton];
[self.screenShotButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@(self.areaInsets.right));
make.centerY.equalTo(self).offset(-24);
make.width.and.height.equalTo(@30);
}];
*/
if (appear) {
if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) {
......@@ -1379,6 +1482,7 @@ static CGFloat barrageBgHeight = 40;
}
if (interfaceOrientation == UIInterfaceOrientationLandscapeRight) {
[_gifButton mas_updateConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@(10 + 30));
}];
......@@ -1392,6 +1496,23 @@ static CGFloat barrageBgHeight = 40;
}];
}
if (interfaceOrientation == UIInterfaceOrientationPortrait) {
[_gifButton mas_updateConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@(10 + 30));
}];
[_screenShotButton mas_updateConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@(10 + 30));
}];
[_disableGesButton mas_updateConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(@(self.areaInsets.left));
}];
}
}else{
if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) {
......@@ -1423,6 +1544,20 @@ static CGFloat barrageBgHeight = 40;
}];
}
if (interfaceOrientation == UIInterfaceOrientationPortrait) {
[_gifButton mas_updateConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@(10 + 30));
}];
[_screenShotButton mas_updateConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@(10 + 30));
}];
[_disableGesButton mas_updateConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(@(-40));
}];
}
}
}else{
if (appear) {
......@@ -1479,7 +1614,6 @@ static CGFloat barrageBgHeight = 40;
[_disableGesButton mas_updateConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(@(self.areaInsets.left));
}];
}
if (self.isShowMarkView && self.isFull) {
......@@ -1536,7 +1670,6 @@ static CGFloat barrageBgHeight = 40;
[_disableGesButton mas_updateConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(@(-self.areaInsets.left - 30));
}];
}
[self showOrHiddenMarkView:YES];
......@@ -1737,14 +1870,18 @@ static CGFloat barrageBgHeight = 40;
[self saveNsUserDefaults];
[self.barrageManager cancelRequest];
[self writeSliderWithVideoID:self.downloadModel.videoId];
}else{
if (!self.isFull) {
[self saveNsUserDefaults];
[self.barrageManager cancelRequest];
[self writeSliderWithVideoID:self.vodModel.videoId];
}
}
if ([_delegate respondsToSelector:@selector(vodPlayerView:ReturnBackAction:)]) {
[_delegate vodPlayerView:self ReturnBackAction:self.isFull];
}
......@@ -2028,6 +2165,14 @@ static CGFloat barrageBgHeight = 40;
//非锁屏
[self createFuncTimer];
}
if ([self.delegate respondsToSelector:@selector(vodPlayerViewLockScreen:)]) {
[self.delegate vodPlayerViewLockScreen:self.isLock];
}
if (!self.isLock) {
[[UIDevice currentDevice] setValue:[NSNumber numberWithInteger:UIDeviceOrientationLandscapeLeft] forKey:@"orientation"];
}
}
-(void)setIsLock:(BOOL)isLock
......@@ -3350,6 +3495,9 @@ static CGFloat barrageBgHeight = 40;
}
}
//读取可拖拽位置
self.sliderTime = [self readSliderWithVideoID:self.downloadModel ? self.downloadModel.videoId : self.vodModel.videoId];
//读取原先的播放时间 用oldTimeScrub方法
[self.playerView oldTimeScrub:self.switchTime];
......@@ -3368,6 +3516,12 @@ static CGFloat barrageBgHeight = 40;
[self endRecordGif];
}
if (self.downloadModel) {
[self writeSliderWithVideoID:self.downloadModel.videoId];
}else{
[self writeSliderWithVideoID:self.vodModel.videoId];
}
DWConfigurationManager * manager = [DWConfigurationManager sharedInstance];
if (manager.isOpenAd) {
if ([self.delegate respondsToSelector:@selector(vodPlayerViewEndAd:)]) {
......@@ -3388,6 +3542,12 @@ static CGFloat barrageBgHeight = 40;
[self hideHudWithMessage:nil];
}
if (self.allowSlider) {
if (self.sliderTime < time) {
self.sliderTime = time;
}
}
self.currentPlayDuration = time;
//授权验证功能
......
......@@ -210,21 +210,20 @@ static CGFloat bottomFuncBgHeight = 39;
-(void)upnpSubscriptionPlay
{
[self play];
// [self play];
[self.renderer getTransportInfo];
[self.renderer getPositionInfo];
}
-(void)upnpSubscriptionPause
{
[self pause];
// [self pause];
[self.renderer getTransportInfo];
}
-(void)upnpSubscriptionStop
{
//结束投屏
[self.renderer stop];
//结束订阅
[self.subscription cancelSubscribe];
......@@ -236,7 +235,8 @@ static CGFloat bottomFuncBgHeight = 39;
-(void)upnpSubscriptionWithError:(NSError *)error
{
[@"订阅失败" showAlert];
// [@"订阅失败" showAlert];
[error.localizedDescription showAlert];
}
#pragma mark - DWUPnPResponseDelegate
......@@ -245,8 +245,9 @@ static CGFloat bottomFuncBgHeight = 39;
{
NSLog(@"upnpUndefinedResponse resXML:%@ \npostXML:%@",resXML,postXML);
if (!resXML) {
[self.renderer getTransportInfo];
//投屏失败