Commit c2540542 authored by Han Ruisong's avatar Han Ruisong
Browse files

升级到 4.6.1

1.优化DWPlayerView工作流程。
2.demo中新增播放失败重试逻辑。
parent b7b1c442
No preview for this file type
This diff is collapsed.
......@@ -49,7 +49,6 @@
// [self reloadLoaclData];
[self reloadNetworkData];
}
-(void)reloadNetworkData
......
......@@ -74,6 +74,8 @@
@property(nonatomic,assign)CGSize titleLabelSize;
@property(nonatomic,assign)BOOL playRepeat;//是否进行过重试
//top
@property(nonatomic,strong)DWPlayerFuncBgView * topFuncBgView;
@property(nonatomic,strong)UIButton * backButton;//返回按钮
......@@ -223,10 +225,12 @@ static CGFloat barrageBgHeight = 40;
self.isLock = NO;
self.isScreening = NO;
//是否允许后台播放
// self.allowBackgroundPlay = YES;
// self.allowBackgroundPlay = YES;
self.allowBackgroundPlay = NO;
self.titleLabelSize = CGSizeZero;
self.playRepeat = NO;
//是否开启小窗播放
// self.openWindowsPlay = YES;
......@@ -326,6 +330,8 @@ static CGFloat barrageBgHeight = 40;
self.videoModel = videoModel;
self.playRepeat = NO;
[self.playerView playVodViedo:videoModel withCustomId:nil];
[self play];
......@@ -462,6 +468,24 @@ static CGFloat barrageBgHeight = 40;
return self.titleLabel.text;
}
-(void)playFailureRepeat
{
if (self.videoModel && !self.playRepeat) {
//在线媒体,且未进行过重试
if (self.playerView.qualityModel) {
[self showHudWithMessage:@"努力加载中,请稍后"];
[self.playerView switchQuality:self.playerView.qualityModel withCustomId:nil];
[self play];
}
self.playRepeat = YES;
}else{
[@"播放失败,请重试" showAlert];
[self hideHudWithMessage:nil];
}
}
#pragma mark - function
//保存videoModel ,并对打点,问答,字幕等功能数据进行处理
-(void)setVideoModel:(DWVodVideoModel *)videoModel
......@@ -1010,6 +1034,8 @@ static CGFloat barrageBgHeight = 40;
self.readyToPlay = NO;
self.playRepeat = NO;
//如果VR视图存在,需要重新创建
if (self.vrView) {
[self.vrView removeFromSuperview];
......@@ -3252,15 +3278,20 @@ static CGFloat barrageBgHeight = 40;
return;
}
[[NSString stringWithFormat:@"%@",error.localizedDescription] showAlert];
//播放失败,延迟3秒进行重试
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(playFailureRepeat) object:nil];
[self performSelector:@selector(playFailureRepeat) withObject:self afterDelay:3];
// [[NSString stringWithFormat:@"%@",error.localizedDescription] showAlert];
[self hideHudWithMessage:nil];
// [self hideHudWithMessage:nil];
}
//加载超时/scrub超时
- (void)videoPlayer:(DWPlayerView *)playerView receivedTimeOut:(DWPlayerViewTimeOut )timeOut
{
[@"加载超时,请稍后" showAlert];
// [@"加载超时,请稍后" showAlert];
}
//AVPlayerLayer对象变动时回调
......
......@@ -25,7 +25,6 @@
{
if (self == [super init]) {
//配置默认值 这里
self.DWAccount_userId = @"391E6E3340A00767";
self.DWAccount_apikey = @"T8WdOUuvFEiOsou1xjDr4U73v12M7iNa";
......
......@@ -43,10 +43,10 @@
<string>使用期间允许定位</string>
<key>NSMicrophoneUsageDescription</key>
<string>请求访问麦克风</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>我们需要访问您的相册</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>添加截图到您的相册</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>我们需要访问您的相册</string>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
......
......@@ -30,5 +30,5 @@
#import "DWBarrageModel.h"
//版本号
#define SDK_VERSION @"4.6.0"
#define SDK_VERSION @"4.6.1"
No preview for this file type
......@@ -93,7 +93,7 @@
<footer>
<div class="footer-copyright">
<p class="copyright">Copyright &copy; 2020 com.bokecc. All rights reserved. Updated: 2020-06-19</p>
<p class="copyright">Copyright &copy; 2019 com.bokecc. All rights reserved. Updated: 2019-07-02</p>
<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>
......
......@@ -93,7 +93,7 @@
<footer>
<div class="footer-copyright">
<p class="copyright">Copyright &copy; 2020 com.bokecc. All rights reserved. Updated: 2020-06-19</p>
<p class="copyright">Copyright &copy; 2019 com.bokecc. All rights reserved. Updated: 2019-07-02</p>
<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>
......
......@@ -125,7 +125,7 @@
<footer>
<div class="footer-copyright">
<p class="copyright">Copyright &copy; 2020 com.bokecc. All rights reserved. Updated: 2020-06-19</p>
<p class="copyright">Copyright &copy; 2019 com.bokecc. All rights reserved. Updated: 2019-07-02</p>
<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>
......
......@@ -93,7 +93,7 @@
<footer>
<div class="footer-copyright">
<p class="copyright">Copyright &copy; 2020 com.bokecc. All rights reserved. Updated: 2020-06-19</p>
<p class="copyright">Copyright &copy; 2019 com.bokecc. All rights reserved. Updated: 2019-07-02</p>
<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>
......
......@@ -93,7 +93,7 @@
<footer>
<div class="footer-copyright">
<p class="copyright">Copyright &copy; 2020 com.bokecc. All rights reserved. Updated: 2020-06-19</p>
<p class="copyright">Copyright &copy; 2019 com.bokecc. All rights reserved. Updated: 2019-07-02</p>
<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>
......
......@@ -93,7 +93,7 @@
<footer>
<div class="footer-copyright">
<p class="copyright">Copyright &copy; 2020 com.bokecc. All rights reserved. Updated: 2020-06-19</p>
<p class="copyright">Copyright &copy; 2019 com.bokecc. All rights reserved. Updated: 2019-07-02</p>
<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>
......
......@@ -93,7 +93,7 @@
<footer>
<div class="footer-copyright">
<p class="copyright">Copyright &copy; 2020 com.bokecc. All rights reserved. Updated: 2020-06-19</p>
<p class="copyright">Copyright &copy; 2019 com.bokecc. All rights reserved. Updated: 2019-07-02</p>
<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>
......
......@@ -93,7 +93,7 @@
<footer>
<div class="footer-copyright">
<p class="copyright">Copyright &copy; 2020 com.bokecc. All rights reserved. Updated: 2020-06-19</p>
<p class="copyright">Copyright &copy; 2019 com.bokecc. All rights reserved. Updated: 2019-07-02</p>
<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>
......
......@@ -93,7 +93,7 @@
<footer>
<div class="footer-copyright">
<p class="copyright">Copyright &copy; 2020 com.bokecc. All rights reserved. Updated: 2020-06-19</p>
<p class="copyright">Copyright &copy; 2019 com.bokecc. All rights reserved. Updated: 2019-07-02</p>
<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>
......
......@@ -93,7 +93,7 @@
<footer>
<div class="footer-copyright">
<p class="copyright">Copyright &copy; 2020 com.bokecc. All rights reserved. Updated: 2020-06-19</p>
<p class="copyright">Copyright &copy; 2019 com.bokecc. All rights reserved. Updated: 2019-07-02</p>
<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>
......
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