Commit 2c5a6a60 authored by Han Ruisong's avatar Han Ruisong
Browse files

升级到v4.3.0

1.支持视频后台播放功能。
2.支持iPad画中画功能。
3.修复了修改DWDownloadModel,othersInfo字段时,没有正确本地化的问题。
4.优化上传流程。
parent c955e5a1
No preview for this file type
This diff is collapsed.
......@@ -15,7 +15,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B547EC4518E033FB00BC980C"
BuildableName = "Demo.app"
BuildableName = "cc&#x89c6;&#x9891;Demo.app"
BlueprintName = "Demo"
ReferencedContainer = "container:Demo.xcodeproj">
</BuildableReference>
......@@ -31,7 +31,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B547EC4518E033FB00BC980C"
BuildableName = "Demo.app"
BuildableName = "cc&#x89c6;&#x9891;Demo.app"
BlueprintName = "Demo"
ReferencedContainer = "container:Demo.xcodeproj">
</BuildableReference>
......@@ -54,7 +54,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B547EC4518E033FB00BC980C"
BuildableName = "Demo.app"
BuildableName = "cc&#x89c6;&#x9891;Demo.app"
BlueprintName = "Demo"
ReferencedContainer = "container:Demo.xcodeproj">
</BuildableReference>
......@@ -78,7 +78,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B547EC4518E033FB00BC980C"
BuildableName = "Demo.app"
BuildableName = "cc&#x89c6;&#x9891;Demo.app"
BlueprintName = "Demo"
ReferencedContainer = "container:Demo.xcodeproj">
</BuildableReference>
......
......@@ -3,4 +3,38 @@
uuid = "D493E4A5-FF32-4C5D-B61B-0D88D4BD1AD4"
type = "1"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "53481B44-496B-4AFE-BB73-921D3435F10F"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Demo/Classes/View/Player/DWVodPlayerView.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "285"
endingLineNumber = "285"
landmarkName = "-reLayoutWithScreenState:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "E476312C-182F-444B-80E2-2B8FBA9C9285"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Demo/Classes/View/Player/DWVodPlayerView.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "291"
endingLineNumber = "291"
landmarkName = "-reLayoutWithScreenState:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
......@@ -24,7 +24,6 @@
@implementation DWMainViewController
- (void)viewDidLoad {
[super viewDidLoad];
......@@ -94,7 +93,7 @@
//请自行替换数据
NSArray * videos = @[];
for (int i = 0; i < videos.count; i++) {
DWVodModel * vodModel = [[DWVodModel alloc]init];
vodModel.videoId = [videos objectAtIndex:i];
......
......@@ -244,7 +244,10 @@
}
}
}
// if (CGRectGetMaxY(lastView.frame) > self.bgScrollView.frame.size.height) {
// self.bgScrollView.contentSize = CGSizeMake(self.view.frame.size.width, CGRectGetMaxY(lastView.frame));
// }
}
@end
......@@ -26,8 +26,9 @@
#import "DWVisitorCollectView.h"
#import "DWExercisesAlertView.h"
#import "DWExercisesView.h"
#import <AVKit/AVKit.h>
@interface DWVodPlayerView ()<DWVideoPlayerDelegate,DWPlayerSettingViewDelegate,DWGifRecordFinishViewDelegate,DWVisitorCollectViewDelegate,DWExercisesAlertViewDelegate,DWExercisesViewDelegate>
@interface DWVodPlayerView ()<DWVideoPlayerDelegate,DWPlayerSettingViewDelegate,DWGifRecordFinishViewDelegate,DWVisitorCollectViewDelegate,DWExercisesAlertViewDelegate,DWExercisesViewDelegate,AVPictureInPictureControllerDelegate>
@property(nonatomic,strong)UIView * maskView;//遮罩层
......@@ -43,6 +44,11 @@
//是否加载完毕
@property(nonatomic,assign)BOOL readyToPlay;
//是否开启后台播放
@property(nonatomic,assign)BOOL allowBackgroundPlay;
//是否开启画中画,仅对pad有效
@property(nonatomic,assign)BOOL allowPictureInPicture;
@property(nonatomic,assign)UIEdgeInsets areaInsets;
@property(nonatomic,assign)BOOL isFull;
@property(nonatomic,assign)BOOL isVideo;//当前播放模式 视频 / 音频
......@@ -59,6 +65,7 @@
@property(nonatomic,strong)UIButton * vrInteractiveButton;//vrButton
@property(nonatomic,strong)UIButton * vrDisplayButton;//vrButton
@property(nonatomic,strong)UIButton * screeningButton;//投屏按钮
@property(nonatomic,strong)UIButton * pipButton;//画中画按钮
//bottom
@property(nonatomic,strong)DWPlayerFuncBgView * bottomFuncBgView;
......@@ -151,6 +158,9 @@
//**************************** airPlay ****************************
@property(nonatomic,strong)UILabel * airPlayStatusLabel;
//**************************** ipad PictureInPicture ****************************
@property(nonatomic,strong)AVPictureInPictureController * pipVC;
@end
@implementation DWVodPlayerView
......@@ -169,6 +179,11 @@ static const CGFloat gifSeconds = 0.25;
self.isShowMarkView = NO;
self.isLock = NO;
self.isScreening = NO;
//是否允许后台播放
self.allowBackgroundPlay = NO;
//是否开启画中画
self.allowPictureInPicture = NO;
self.backgroundColor = [UIColor blackColor];
[self initMaskView];
......@@ -374,6 +389,11 @@ static const CGFloat gifSeconds = 0.25;
//更新约束和控件状态
-(void)updateConstraintsAndHidden
{
NSInteger buttonCount = 1;
if (IS_PAD) {
buttonCount++;
}
if (self.isFull) {
self.otherFuncButton.hidden = NO;
self.speedButton.hidden = NO;
......@@ -523,11 +543,11 @@ static const CGFloat gifSeconds = 0.25;
[self.vrLibrary switchInteractiveMode:_interative];
[_vrInteractiveButton mas_updateConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@(-(40 * 1) - 10));
make.right.equalTo(@(-(40 * buttonCount) - 10));
}];
[_vrDisplayButton mas_updateConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@(-(40 * 2) - 10));
make.right.equalTo(@(-(40 * (buttonCount + 1)) - 10));
}];
}
......@@ -591,11 +611,11 @@ static const CGFloat gifSeconds = 0.25;
[self.vrLibrary switchInteractiveMode:_interative];
[_vrInteractiveButton mas_updateConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@(-(40 * 2) - 10));
make.right.equalTo(@(-(40 * (buttonCount + 1)) - 10));
}];
[_vrDisplayButton mas_updateConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@(-(40 * 3) - 10));
make.right.equalTo(@(-(40 * (buttonCount + 2)) - 10));
}];
}
......@@ -908,6 +928,11 @@ static const CGFloat gifSeconds = 0.25;
-(void)funcIsAppearTap
{
//新增判断,画中画启动时,不显示状态栏
if (self.pipVC && self.pipVC.isPictureInPictureActive) {
return;
}
if (self.funcTimer) {
self.isShowMarkView = NO;
[self destroyFuncTimer];
......@@ -1203,6 +1228,31 @@ static const CGFloat gifSeconds = 0.25;
[self.settingView show];
}
//开启画中画
-(void)pipButtonAction
{
/*
注意:
如果要启用画中画功能,请务必设置DWPlayerView对象下列方法值为YES,允许播放器进行后台播放。否则程序进入后台时,可能无法播放视频。
- (void)setPlayInBackground:(BOOL)play;
*/
if (![AVPictureInPictureController isPictureInPictureSupported]) {
[@"设备不支持画中画功能" showAlert];
return;
}
if (!self.pipVC) {
return;
}
if (self.pipVC.isPictureInPictureActive) {
[self.pipVC stopPictureInPicture];
}else{
[self.pipVC startPictureInPicture];
}
}
//播放/暂停
-(void)playOrPauseButtonAction
{
......@@ -1430,17 +1480,11 @@ static const CGFloat gifSeconds = 0.25;
if (_questionView || self.visitorCollectView || self.exercisesAlertView || self.exercisesView) {
return;
}
if (self.isVideo) {
[self play];
}
}
-(void)didEnterBackgroundNotification
{
if (self.isVideo) {
[self pause];
}
}
-(void)wirelessRouteActiveNotification:(NSNotification *)noti
......@@ -1461,22 +1505,18 @@ static const CGFloat gifSeconds = 0.25;
MPRemoteCommandCenter * commandCenter = [MPRemoteCommandCenter sharedCommandCenter];
commandCenter.playCommand.enabled = YES;
[commandCenter.playCommand addTargetWithHandler:^MPRemoteCommandHandlerStatus(MPRemoteCommandEvent * _Nonnull event) {
if (!weakSelf.isVideo) {
if (!weakSelf.playerView.playing) {
[weakSelf play];
}
}
// if (!weakSelf.playerView.playing) {
[weakSelf play];
// }
return MPRemoteCommandHandlerStatusSuccess;
}];
commandCenter.pauseCommand.enabled = YES;
[commandCenter.pauseCommand addTargetWithHandler:^MPRemoteCommandHandlerStatus(MPRemoteCommandEvent * _Nonnull event) {
if (!weakSelf.isVideo) {
if (weakSelf.playerView.playing) {
[weakSelf pause];
}
}
// if (weakSelf.playerView.playing) {
[weakSelf pause];
// }
return MPRemoteCommandHandlerStatusSuccess;
}];
}
......@@ -2536,10 +2576,9 @@ static const CGFloat gifSeconds = 0.25;
//防止在有数据缓冲,但播放器播放状态与页面按钮状态不一致。
if (self.playerView.player.rate == 0 && self.playOrPauseButton.selected) {
[self play];
self.playOrPauseButton.selected = NO;
}
// NSLog(@"videoPlayerPlaybackLikelyToKeepUp rate:%lf",playerView.player.rate);
}
//加载失败
......@@ -2561,6 +2600,15 @@ static const CGFloat gifSeconds = 0.25;
[@"加载超时,请稍后" showAlert];
}
//AVPlayerLayer对象变动时回调
- (void)videoPlayer:(DWPlayerView *)playerView ChangePlayerLayer:(AVPlayerLayer *)playerLayer
{
if (IS_PAD) {
self.pipVC = [[AVPictureInPictureController alloc]initWithPlayerLayer:self.playerView.playerLayer];
self.pipVC.delegate = self;
}
}
#pragma mark - init
-(void)initMaskView
{
......@@ -2609,10 +2657,21 @@ static const CGFloat gifSeconds = 0.25;
make.centerY.equalTo(self.backButton);
}];
NSInteger buttonCount = 1;
if (IS_PAD) {
buttonCount++;
[self.topFuncBgView addSubview:self.pipButton];
[_pipButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@(-(40 * 1) - 10));
make.width.and.height.equalTo(@30);
make.centerY.equalTo(self.backButton);
}];
}
self.screeningButton.hidden = YES;
[self.topFuncBgView addSubview:self.screeningButton];
[_screeningButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@(-(40 * 1) - 10));
make.right.equalTo(@(-(40 * buttonCount) - 10));
make.width.and.height.equalTo(@30);
make.centerY.equalTo(self.backButton);
}];
......@@ -2620,7 +2679,7 @@ static const CGFloat gifSeconds = 0.25;
self.vrInteractiveButton.hidden = YES;
[self.topFuncBgView addSubview:self.vrInteractiveButton];
[_vrInteractiveButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@(-(40 * 2) - 10));
make.right.equalTo(@(-(40 * (buttonCount + 1)) - 10));
make.width.and.height.equalTo(@30);
make.centerY.equalTo(self.backButton);
}];
......@@ -2628,27 +2687,11 @@ static const CGFloat gifSeconds = 0.25;
self.vrDisplayButton.hidden = YES;
[self.topFuncBgView addSubview:self.vrDisplayButton];
[_vrDisplayButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@(-(40 * 3) - 10));
make.right.equalTo(@(-(40 * (buttonCount + 2)) - 10));
make.width.and.height.equalTo(@30);
make.centerY.equalTo(self.backButton);
}];
/*
self.vrInteractiveButton.hidden = YES;
[self.topFuncBgView addSubview:self.vrInteractiveButton];
[_vrInteractiveButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@(-(40 * 1) - 10));
make.width.and.height.equalTo(@30);
make.centerY.equalTo(self.backButton);
}];
self.vrDisplayButton.hidden = YES;
[self.topFuncBgView addSubview:self.vrDisplayButton];
[_vrDisplayButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(@(-(40 * 2) - 10));
make.width.and.height.equalTo(@30);
make.centerY.equalTo(self.backButton);
}];
*/
}
//底部控件
......@@ -2768,6 +2811,9 @@ static const CGFloat gifSeconds = 0.25;
// self.playerView.loadStyle = DWPlayerViewLoadStyleImmediately;
self.playerView.forwardBufferDuration = 30;
self.playerView.delegate = self;
[self.playerView setPlayInBackground:self.allowBackgroundPlay];
[self.playerView setPictureInPicture:self.allowPictureInPicture];
//是否开启防录屏
// self.playerView.videoProtect = YES;
[self insertSubview:self.playerView atIndex:0];
......@@ -2958,6 +3004,16 @@ static const CGFloat gifSeconds = 0.25;
return _screeningButton;
}
-(UIButton *)pipButton
{
if (!_pipButton) {
_pipButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_pipButton setImage:[UIImage imageNamed:@"icon_pip.png"] forState:UIControlStateNormal];
[_pipButton addTarget:self action:@selector(pipButtonAction) forControlEvents:UIControlEventTouchUpInside];
}
return _pipButton;
}
//底部
-(DWPlayerFuncBgView *)bottomFuncBgView
{
......
......@@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>cc视频Demo</string>
<string>$(PRODUCT_NAME)</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIcons</key>
......@@ -43,6 +43,8 @@
<string>使用期间允许定位</string>
<key>NSMicrophoneUsageDescription</key>
<string>请求访问麦克风</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>我们需要访问您的相册</string>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
......@@ -61,7 +63,5 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>NSPhotoLibraryUsageDescription</key>
<string>我们需要访问您的相册</string>
</dict>
</plist>
......@@ -18,6 +18,8 @@
#define IsIOS7 ([[[[UIDevice currentDevice] systemVersion] substringToIndex:1] intValue]>=7)
#define IS_PAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
#define ScreenWidth [UIScreen mainScreen].bounds.size.width
#define ScreenHeight [UIScreen mainScreen].bounds.size.height
......
......@@ -56,6 +56,9 @@ typedef NS_ENUM(NSUInteger, DWPlayerViewLoadStyle) {
//加载失败
- (void)videoPlayer:(DWPlayerView *)playerView didFailWithError:(NSError *)error;
//AVPlayerLayer对象发生改变时回调
- (void)videoPlayer:(DWPlayerView *)playerView ChangePlayerLayer:(AVPlayerLayer *)playerLayer;
@end
@interface DWPlayerView : UIView
......@@ -198,13 +201,20 @@ typedef NS_ENUM(NSUInteger, DWPlayerViewLoadStyle) {
-(void)switchSparPlayLine;
/**
设置是否允许后台播放,目前只支持音频后台播放
设置是否允许后台播放
@param play 是否允许后台播放
*/
- (void)setPlayInBackground:(BOOL)play;
/**
设置是否画中画模式
@param play 是否画中画模式
*/
- (void)setPictureInPicture:(BOOL)openPIP API_AVAILABLE(ios(9.0));
/**
切换倍速
......
......@@ -26,5 +26,5 @@
#import "DWVodAdInfoModel.h"
//版本号
#define SDK_VERSION @"4.2.7"
#define SDK_VERSION @"4.3.0"
No preview for this file type
......@@ -500,6 +500,6 @@ header, .context-menu, .megamenu-content, footer{
</style>
</head>
<body class='typora-export' >
<div id='write' class = 'is-mac'><h1><a name="概述" class="md-header-anchor"></a><span>概述</span></h1><h2><a name="sdk简介" class="md-header-anchor"></a><span>SDK简介</span></h2><p><span>iOS点播SDK是适用于iOS平台的云点播SDK。使用此SDK可以与CC视频云服务进行对接,在iOS端使用CC视频的点播功能。</span></p><h2><a name="设备及开发环境" class="md-header-anchor"></a><span>设备及开发环境</span></h2><p><span>Xcode 集成开发环境。</span></p><p><span>iOS 运行环境:iOS 8.0 及以上系统,armv7、arm64、x86_64的CPU架构。</span></p><h2><a name="功能特性" class="md-header-anchor"></a><span>功能特性</span></h2><figure><table><thead><tr><th><span>功能</span></th><th style='text-align:left;' ><span>描述</span></th></tr></thead><tbody><tr><td><span>播放功能</span></td><td style='text-align:left;' ><span>支持加密/非加密音视频在线和本地播放</span></td></tr><tr><td><span>广告功能</span></td><td style='text-align:left;' ><span>支持添加视频前贴广告和暂停广告</span></td></tr><tr><td><span>播放统计</span></td><td style='text-align:left;' ><span>支持用户实现播放的统计</span></td></tr><tr><td><span>视频打点</span></td><td style='text-align:left;' ><span>支持用户自定义视频打点功能</span></td></tr><tr><td><span>视频问答</span></td><td style='text-align:left;' ><span>支持用户自定义问答功能</span></td></tr><tr><td><span>视频字幕</span></td><td style='text-align:left;' ><span>支持从服务器获取字幕资源并显示</span></td></tr><tr><td><span>授权验证</span></td><td style='text-align:left;' ><span>支持设置视频是否允许预览</span></td></tr><tr><td><span>原片播放</span></td><td style='text-align:left;' ><span>支持视频上传之后,立即播放</span></td></tr><tr><td><span>访客信息收集</span></td><td style='text-align:left;' ><span>支持访客信息收集功能</span></td></tr><tr><td><span>课堂练习</span></td><td style='text-align:left;' ><span>支持课堂练习功能</span></td></tr><tr><td><span>播放器皮肤</span></td><td style='text-align:left;' ><span>支持带皮肤的播放页面</span></td></tr><tr><td><span>视频投屏</span></td><td style='text-align:left;' ><span>支持DLNA投屏</span></td></tr><tr><td><span>防录屏</span></td><td style='text-align:left;' ><span>支持视频防录屏功能</span></td></tr><tr><td><span>动态水印</span></td><td style='text-align:left;' ><span>支持上传视频时,添加动态水印</span></td></tr><tr><td><span>VR视频</span></td><td style='text-align:left;' ><span>支持VR视频播放</span></td></tr><tr><td><span>GIF录制</span></td><td style='text-align:left;' ><span>支持GIF录制功能</span></td></tr><tr><td><span>上传功能</span></td><td style='text-align:left;' ><span>支持音视频上传、断点上传,后台上传功能</span></td></tr><tr><td><span>下载功能</span></td><td style='text-align:left;' ><span>支持音视频上传、断点下载、批量下载,后台下载功能</span></td></tr></tbody></table></figure><p>&nbsp;</p></div>
<div id='write' class = 'is-mac'><h1><a name="概述" class="md-header-anchor"></a><span>概述</span></h1><h2><a name="sdk简介" class="md-header-anchor"></a><span>SDK简介</span></h2><p><span>iOS点播SDK是适用于iOS平台的云点播SDK。使用此SDK可以与CC视频云服务进行对接,在iOS端使用CC视频的点播功能。</span></p><h2><a name="设备及开发环境" class="md-header-anchor"></a><span>设备及开发环境</span></h2><p><span>Xcode 集成开发环境。</span></p><p><span>iOS 运行环境:iOS 8.0 及以上系统,armv7、arm64、x86_64的CPU架构。</span></p><h2><a name="功能特性" class="md-header-anchor"></a><span>功能特性</span></h2><figure><table><thead><tr><th><span>功能</span></th><th style='text-align:left;' ><span>描述</span></th></tr></thead><tbody><tr><td><span>播放功能</span></td><td style='text-align:left;' ><span>支持加密/非加密音视频在线和本地播放</span></td></tr><tr><td><span>广告功能</span></td><td style='text-align:left;' ><span>支持添加视频前贴广告和暂停广告</span></td></tr><tr><td><span>播放统计</span></td><td style='text-align:left;' ><span>支持用户实现播放的统计</span></td></tr><tr><td><span>视频打点</span></td><td style='text-align:left;' ><span>支持用户自定义视频打点功能</span></td></tr><tr><td><span>视频问答</span></td><td style='text-align:left;' ><span>支持用户自定义问答功能</span></td></tr><tr><td><span>视频字幕</span></td><td style='text-align:left;' ><span>支持从服务器获取字幕资源并显示</span></td></tr><tr><td><span>授权验证</span></td><td style='text-align:left;' ><span>支持设置视频是否允许预览</span></td></tr><tr><td><span>原片播放</span></td><td style='text-align:left;' ><span>支持视频上传之后,立即播放</span></td></tr><tr><td><span>访客信息收集</span></td><td style='text-align:left;' ><span>支持访客信息收集功能</span></td></tr><tr><td><span>课堂练习</span></td><td style='text-align:left;' ><span>支持课堂练习功能</span></td></tr><tr><td><span>播放器皮肤</span></td><td style='text-align:left;' ><span>支持带皮肤的播放页面</span></td></tr><tr><td><span>视频投屏</span></td><td style='text-align:left;' ><span>支持DLNA投屏</span></td></tr><tr><td><span>防录屏</span></td><td style='text-align:left;' ><span>支持视频防录屏功能</span></td></tr><tr><td><span>动态水印</span></td><td style='text-align:left;' ><span>支持上传视频时,添加动态水印</span></td></tr><tr><td><span>VR视频</span></td><td style='text-align:left;' ><span>支持VR视频播放</span></td></tr><tr><td><span>GIF录制</span></td><td style='text-align:left;' ><span>支持GIF录制功能</span></td></tr><tr><td><span>上传功能</span></td><td style='text-align:left;' ><span>支持音视频上传、断点上传,后台上传功能</span></td></tr><tr><td><span>下载功能</span></td><td style='text-align:left;' ><span>支持音视频上传、断点下载、批量下载,后台下载功能</span></td></tr><tr><td><span>画中画功能</span></td><td style='text-align:left;' ><span>支持iPad画中画播放</span></td></tr></tbody></table></figure><p>&nbsp;</p></div>
</body>
</html>
\ No newline at end of file
......@@ -500,6 +500,6 @@ header, .context-menu, .megamenu-content, footer{
</style>
</head>
<body class='typora-export' >
<div id='write' class = 'is-mac'><h1><a name="更新日志" class="md-header-anchor"></a><span>更新日志 </span></h1><h2><a name="version-427" class="md-header-anchor"></a><span>Version 4.2.7</span></h2><p><span>发布时间:2019-01-02</span></p><p><span>更新内容:</span></p><p><span>1.优化了demo界面显示效果。</span></p><p><span>2.修复了下载时,导致任务异常失败的bug。</span></p><p><span>3.优化上传流程,同时解决了偶发导致程序闪退的bug。</span></p><p><span>4.优化数据统计相关逻辑。</span></p><h2><a name="version-425" class="md-header-anchor"></a><span>Version 4.2.5</span></h2><p><span>发布时间:2019-12-04</span></p><p><span>更新内容:</span></p><p><span>1.修复了视频文件上传时,SDK异常输出失败的bug。</span></p><p><span>2.优化下载流程,现在可以对等待中的下载任务进行暂停/继续下载操作了。</span></p><h2><a name="version-424" class="md-header-anchor"></a><span>Version 4.2.4</span></h2><p><span>发布时间:2019-11-14</span></p><p><span>更新内容:</span></p><p><span>1.demo页面逻辑优化。</span></p><p><span>2.SDK上传功能逻辑优化。</span></p><p><span>3.DWPlayInfo新增取消网络请求方法。</span></p><p><span>4.修复了4.2.3版本在低版本Xcode编译报错的问题。</span></p><h2><a name="version-423" class="md-header-anchor"></a><span>Version 4.2.3</span></h2><p><span>发布时间:2019-10-10</span></p><p><span>更新内容:</span></p><p><span>1.修复了iOS13下,播放本地视频可能会导致内存异常上涨的bug。</span></p><p><span>2.iOS13适配。</span></p><h2><a name="version-422" class="md-header-anchor"></a><span>Version 4.2.2</span></h2><p><span>发布时间:2019-08-27</span></p><p><span>更新内容:</span></p><p><span>1.DWPlayerView新增AVPlayerLayer属性。</span></p><p><span>2.修复了不引入DWSDK.h可能导致编译报错的bug。</span></p><h2><a name="version-421" class="md-header-anchor"></a><span>Version 4.2.1</span></h2><p><span>发布时间:2019-08-19</span></p><p><span>更新内容:</span></p><p><span>1.支持视频后台上传。</span></p><p><span>2.优化下载流程。</span></p><h2><a name="version-420" class="md-header-anchor"></a><span>Version 4.2.0</span></h2><p><span>发布时间:2019-08-12</span></p><p><span>更新内容:</span></p><p><span>1.新增视频防录屏功能</span></p><p><span>2.新增视频动态水印</span></p><p><span>3.优化离线视频播放流程</span></p><p><span>4.优化下载暂停流程</span></p><h2><a name="version-410" class="md-header-anchor"></a><span>Version 4.1.0</span></h2><p><span>发布时间:2019-07-30</span></p><p><span>更新内容:</span></p><p><span>1.新增视频投屏功能。</span></p><p><span>2.优化视频问答流程。</span></p><p><span>3.将resource.bundle修改为DWResource.bundle防止引入冲突。 </span></p><h2><a name="version-403" class="md-header-anchor"></a><span>Version 4.0.3</span></h2><p><span>发布时间:2019-07-09</span></p><p><span>更新内容:</span></p><p><span>1.修复了备用线路地址输出不正确的bug。</span></p><h2><a name="version-402" class="md-header-anchor"></a><span>Version 4.0.2</span></h2><p><span>发布时间:2019-07-03</span></p><p><span>更新内容:</span></p><p><span>1.修复了课堂练习显示有问题的bug。</span></p><h2><a name="version-401" class="md-header-anchor"></a><span>Version 4.0.1</span></h2><p><span>发布时间:2019-07-02</span></p><p><span>更新内容:</span></p><p><span>1.课堂练习功能。</span></p><p><span>2.支持m3u8格式,缓存时长控制。</span></p><p><span>3.修复了iPhone7及plus机型下,m3u8播放链接可能会返回有误的问题。</span></p><h2><a name="version-400" class="md-header-anchor"></a><span>Version 4.0.0</span></h2><p><span>发布时间:2019-06-18</span></p><p><span>更新内容:</span></p><p><span>1.demo全新升级。</span></p><p><span>2.加密与非加密版本的demo合并。</span></p><p><span>3.支持Cocoapods方式集成。</span></p><p><span>4.优化SDK使用方式。</span></p><h2><a name="version-345" class="md-header-anchor"></a><span>Version 3.4.5</span></h2><p><span>发布时间:2019-06-14</span></p><p><span>更新内容:</span></p><p><span>1.视频问答优化。</span></p><p><span>2.广告播放流程优化。</span></p><p><span>3.修复了低版本下,播放音频时可能会导致闪退的问题。</span></p><h2><a name="version-344" class="md-header-anchor"></a><span>Version 3.4.4</span></h2><p><span>发布时间:2019-05-17</span></p><p><span>更新内容:</span></p><p><span>1.新增访客信息收集器功能。 </span><br/><span> </span><br/><span>2.解决了在一些特殊情况下会发生crash的bug。</span></p><h2><a name="version-343" class="md-header-anchor"></a><span>Version 3.4.3</span></h2><p><span>发布时间:2019-04-19</span></p><p><span>更新内容:</span></p><p><span>1.修复了播放离线音视频可能会crash的bug。</span></p><h2><a name="version-341" class="md-header-anchor"></a><span>Version 3.4.1</span></h2><p><span>发布时间:2019-04-02</span></p><p><span>更新内容:</span></p><p><span>1.优化了播放音频时,可能出现的缓冲时间过长的问题。</span></p><h2><a name="version-340" class="md-header-anchor"></a><span>Version 3.4.0</span></h2><p><span>发布时间:2019-03-06</span></p><p><span>更新内容:</span></p><p><span>1.新增音频DRM加密功能。</span></p><h2><a name="version-336" class="md-header-anchor"></a><span>Version 3.3.6</span></h2><p><span>发布时间:2019-02-27</span></p><p><span>更新内容:</span></p><p><span>1.修复了对同一DWDrmServer对象多次调用start/stop,引起crash的bug。</span></p><h2><a name="version-335" class="md-header-anchor"></a><span>Version 3.3.5</span></h2><p><span>发布时间:2019-02-14</span></p><p><span>更新内容:</span></p><p><span>1.视频批量下载功能。</span></p><p><span>2.修复了Demo界面上的一些显示bug。</span></p><h2><a name="version-334" class="md-header-anchor"></a><span>Version 3.3.4</span></h2><p><span>发布时间:2019-01-25</span></p><p><span>更新内容:</span></p><p><span>1.新增字幕切换功能。</span></p><h2><a name="version-333" class="md-header-anchor"></a><span>Version 3.3.3</span></h2><p><span>发布时间:2019-01-09</span></p><p><span>更新内容:</span></p><p><span>1.修复了iOS11.3之后,当原URL失效时,无法使用新URL继续下载的BUG。</span></p><h2><a name="version-332" class="md-header-anchor"></a><span>Version 3.3.2</span></h2><p><span>发布时间:2018-12-26</span></p><p><span>更新内容:</span></p><p><span>1.完善SDK内部播放出错处理机制。</span></p><p><span>2.优化了demo流程,播放失败时自动切换备用线路。</span></p><p><span>3.修复了demo中的一些bug。</span></p><h2><a name="version-331" class="md-header-anchor"></a><span>Version 3.3.1</span></h2><p><span>发布时间:2018-12-12</span></p><p><span>更新内容:</span></p><p><span>1.GIF功能整合,m3u8视频格式可以正常生成GIF。</span></p><p><span>2.修复了Drm模块在弱网下可能引发的一些问题。</span></p><h2><a name="version-330" class="md-header-anchor"></a><span>Version 3.3.0</span></h2><p><span>发布时间:2018-11-22</span></p><p><span>更新内容:</span></p><p><span>1.视频问答新增单选多选类型。</span></p><p><span>2.新增网络检测功能。</span></p><p><span>3.原片实时播放流程处理。</span></p><p><span>4.修复了demo中的一些bug。</span></p><h2><a name="version-321" class="md-header-anchor"></a><span>Version 3.2.1</span></h2><p><span>发布时间:2018-10-26</span></p><p><span>更新内容:</span></p><p><span>1.SDK新增错误码。</span></p><p><span>2.修复了在iOS12下,导致程序crash的BUG。</span></p><h2><a name="version-320" class="md-header-anchor"></a><span>Version 3.2.0</span></h2><p><span>发布时间:2018-08-28</span></p><p><span>更新内容:</span></p><p><span>1.增加授权验证功能。</span></p><p><span>2.增加自定义超时时间功能。</span></p><h2><a name="version-318" class="md-header-anchor"></a><span>Version 3.1.8</span></h2><p><span>发布时间:2018-06-12</span></p><p><span>更新内容:</span></p><p><span>1.新增问答统计功能</span></p><h2><a name="version-317" class="md-header-anchor"></a><span>Version 3.1.7</span></h2><p><span>发布时间:2018-06-07</span></p><p><span>更新内容:</span></p><p><span>1.改善SDK帮助文档。</span></p><h2><a name="version-316" class="md-header-anchor"></a><span>Version 3.1.6</span></h2><p><span>发布时间:2018-05-22</span></p><p><span>更新内容:</span></p><p><span>1.增加字幕显示功能。</span></p><h2><a name="version-315" class="md-header-anchor"></a><span>Version 3.1.5</span></h2><p><span>发布时间:2018-05-15</span></p><p><span>更新内容:</span></p><p><span>1.新增问答图片显示功能。</span></p><h2><a name="version-314" class="md-header-anchor"></a><span>Version 3.1.4</span></h2><p><span>发布时间:2018-05-10</span></p><p><span>更新内容:</span></p><p><span>1.上传功能优化。</span></p></div>
<div id='write' class = 'is-mac'><h1><a name="更新日志" class="md-header-anchor"></a><span>更新日志 </span></h1><h2><a name="version-430" class="md-header-anchor"></a><span>Version 4.3.0</span></h2><p><span>发布时间:2020-02-21</span></p><p><span>1.支持视频后台播放功能。</span></p><p><span>2.支持iPad画中画功能。</span></p><p><span>3.修复了修改DWDownloadModel,othersInfo字段时,没有正确本地化的问题。</span></p><p><span>4.优化上传流程。</span></p><h2><a name="version-427" class="md-header-anchor"></a><span>Version 4.2.7</span></h2><p><span>发布时间:2019-01-02</span></p><p><span>更新内容:</span></p><p><span>1.优化了demo界面显示效果。</span></p><p><span>2.修复了下载时,导致任务异常失败的bug。</span></p><p><span>3.优化上传流程,同时解决了偶发导致程序闪退的bug。</span></p><p><span>4.优化数据统计相关逻辑。</span></p><h2><a name="version-425" class="md-header-anchor"></a><span>Version 4.2.5</span></h2><p><span>发布时间:2019-12-04</span></p><p><span>更新内容:</span></p><p><span>1.修复了视频文件上传时,SDK异常输出失败的bug。</span></p><p><span>2.优化下载流程,现在可以对等待中的下载任务进行暂停/继续下载操作了。</span></p><h2><a name="version-424" class="md-header-anchor"></a><span>Version 4.2.4</span></h2><p><span>发布时间:2019-11-14</span></p><p><span>更新内容:</span></p><p><span>1.demo页面逻辑优化。</span></p><p><span>2.SDK上传功能逻辑优化。</span></p><p><span>3.DWPlayInfo新增取消网络请求方法。</span></p><p><span>4.修复了4.2.3版本在低版本Xcode编译报错的问题。</span></p><h2><a name="version-423" class="md-header-anchor"></a><span>Version 4.2.3</span></h2><p><span>发布时间:2019-10-10</span></p><p><span>更新内容:</span></p><p><span>1.修复了iOS13下,播放本地视频可能会导致内存异常上涨的bug。</span></p><p><span>2.iOS13适配。</span></p><h2><a name="version-422" class="md-header-anchor"></a><span>Version 4.2.2</span></h2><p><span>发布时间:2019-08-27</span></p><p><span>更新内容:</span></p><p><span>1.DWPlayerView新增AVPlayerLayer属性。</span></p><p><span>2.修复了不引入DWSDK.h可能导致编译报错的bug。</span></p><h2><a name="version-421" class="md-header-anchor"></a><span>Version 4.2.1</span></h2><p><span>发布时间:2019-08-19</span></p><p><span>更新内容:</span></p><p><span>1.支持视频后台上传。</span></p><p><span>2.优化下载流程。</span></p><h2><a name="version-420" class="md-header-anchor"></a><span>Version 4.2.0</span></h2><p><span>发布时间:2019-08-12</span></p><p><span>更新内容:</span></p><p><span>1.新增视频防录屏功能</span></p><p><span>2.新增视频动态水印</span></p><p><span>3.优化离线视频播放流程</span></p><p><span>4.优化下载暂停流程</span></p><h2><a name="version-410" class="md-header-anchor"></a><span>Version 4.1.0</span></h2><p><span>发布时间:2019-07-30</span></p><p><span>更新内容:</span></p><p><span>1.新增视频投屏功能。</span></p><p><span>2.优化视频问答流程。</span></p><p><span>3.将resource.bundle修改为DWResource.bundle防止引入冲突。 </span></p><h2><a name="version-403" class="md-header-anchor"></a><span>Version 4.0.3</span></h2><p><span>发布时间:2019-07-09</span></p><p><span>更新内容:</span></p><p><span>1.修复了备用线路地址输出不正确的bug。</span></p><h2><a name="version-402" class="md-header-anchor"></a><span>Version 4.0.2</span></h2><p><span>发布时间:2019-07-03</span></p><p><span>更新内容:</span></p><p><span>1.修复了课堂练习显示有问题的bug。</span></p><h2><a name="version-401" class="md-header-anchor"></a><span>Version 4.0.1</span></h2><p><span>发布时间:2019-07-02</span></p><p><span>更新内容:</span></p><p><span>1.课堂练习功能。</span></p><p><span>2.支持m3u8格式,缓存时长控制。</span></p><p><span>3.修复了iPhone7及plus机型下,m3u8播放链接可能会返回有误的问题。</span></p><h2><a name="version-400" class="md-header-anchor"></a><span>Version 4.0.0</span></h2><p><span>发布时间:2019-06-18</span></p><p><span>更新内容:</span></p><p><span>1.demo全新升级。</span></p><p><span>2.加密与非加密版本的demo合并。</span></p><p><span>3.支持Cocoapods方式集成。</span></p><p><span>4.优化SDK使用方式。</span></p><h2><a name="version-345" class="md-header-anchor"></a><span>Version 3.4.5</span></h2><p><span>发布时间:2019-06-14</span></p><p><span>更新内容:</span></p><p><span>1.视频问答优化。</span></p><p><span>2.广告播放流程优化。</span></p><p><span>3.修复了低版本下,播放音频时可能会导致闪退的问题。</span></p><h2><a name="version-344" class="md-header-anchor"></a><span>Version 3.4.4</span></h2><p><span>发布时间:2019-05-17</span></p><p><span>更新内容:</span></p><p><span>1.新增访客信息收集器功能。 </span><br/><span> </span><br/><span>2.解决了在一些特殊情况下会发生crash的bug。</span></p><h2><a name="version-343" class="md-header-anchor"></a><span>Version 3.4.3</span></h2><p><span>发布时间:2019-04-19</span></p><p><span>更新内容:</span></p><p><span>1.修复了播放离线音视频可能会crash的bug。</span></p><h2><a name="version-341" class="md-header-anchor"></a><span>Version 3.4.1</span></h2><p><span>发布时间:2019-04-02</span></p><p><span>更新内容:</span></p><p><span>1.优化了播放音频时,可能出现的缓冲时间过长的问题。</span></p><h2><a name="version-340" class="md-header-anchor"></a><span>Version 3.4.0</span></h2><p><span>发布时间:2019-03-06</span></p><p><span>更新内容:</span></p><p><span>1.新增音频DRM加密功能。</span></p><h2><a name="version-336" class="md-header-anchor"></a><span>Version 3.3.6</span></h2><p><span>发布时间:2019-02-27</span></p><p><span>更新内容:</span></p><p><span>1.修复了对同一DWDrmServer对象多次调用start/stop,引起crash的bug。</span></p><h2><a name="version-335" class="md-header-anchor"></a><span>Version 3.3.5</span></h2><p><span>发布时间:2019-02-14</span></p><p><span>更新内容:</span></p><p><span>1.视频批量下载功能。</span></p><p><span>2.修复了Demo界面上的一些显示bug。</span></p><h2><a name="version-334" class="md-header-anchor"></a><span>Version 3.3.4</span></h2><p><span>发布时间:2019-01-25</span></p><p><span>更新内容:</span></p><p><span>1.新增字幕切换功能。</span></p><h2><a name="version-333" class="md-header-anchor"></a><span>Version 3.3.3</span></h2><p><span>发布时间:2019-01-09</span></p><p><span>更新内容:</span></p><p><span>1.修复了iOS11.3之后,当原URL失效时,无法使用新URL继续下载的BUG。</span></p><h2><a name="version-332" class="md-header-anchor"></a><span>Version 3.3.2</span></h2><p><span>发布时间:2018-12-26</span></p><p><span>更新内容:</span></p><p><span>1.完善SDK内部播放出错处理机制。</span></p><p><span>2.优化了demo流程,播放失败时自动切换备用线路。</span></p><p><span>3.修复了demo中的一些bug。</span></p><h2><a name="version-331" class="md-header-anchor"></a><span>Version 3.3.1</span></h2><p><span>发布时间:2018-12-12</span></p><p><span>更新内容:</span></p><p><span>1.GIF功能整合,m3u8视频格式可以正常生成GIF。</span></p><p><span>2.修复了Drm模块在弱网下可能引发的一些问题。</span></p><h2><a name="version-330" class="md-header-anchor"></a><span>Version 3.3.0</span></h2><p><span>发布时间:2018-11-22</span></p><p><span>更新内容:</span></p><p><span>1.视频问答新增单选多选类型。</span></p><p><span>2.新增网络检测功能。</span></p><p><span>3.原片实时播放流程处理。</span></p><p><span>4.修复了demo中的一些bug。</span></p><h2><a name="version-321" class="md-header-anchor"></a><span>Version 3.2.1</span></h2><p><span>发布时间:2018-10-26</span></p><p><span>更新内容:</span></p><p><span>1.SDK新增错误码。</span></p><p><span>2.修复了在iOS12下,导致程序crash的BUG。</span></p><h2><a name="version-320" class="md-header-anchor"></a><span>Version 3.2.0</span></h2><p><span>发布时间:2018-08-28</span></p><p><span>更新内容:</span></p><p><span>1.增加授权验证功能。</span></p><p><span>2.增加自定义超时时间功能。</span></p><h2><a name="version-318" class="md-header-anchor"></a><span>Version 3.1.8</span></h2><p><span>发布时间:2018-06-12</span></p><p><span>更新内容:</span></p><p><span>1.新增问答统计功能</span></p><h2><a name="version-317" class="md-header-anchor"></a><span>Version 3.1.7</span></h2><p><span>发布时间:2018-06-07</span></p><p><span>更新内容:</span></p><p><span>1.改善SDK帮助文档。</span></p><h2><a name="version-316" class="md-header-anchor"></a><span>Version 3.1.6</span></h2><p><span>发布时间:2018-05-22</span></p><p><span>更新内容:</span></p><p><span>1.增加字幕显示功能。</span></p><h2><a name="version-315" class="md-header-anchor"></a><span>Version 3.1.5</span></h2><p><span>发布时间:2018-05-15</span></p><p><span>更新内容:</span></p><p><span>1.新增问答图片显示功能。</span></p><h2><a name="version-314" class="md-header-anchor"></a><span>Version 3.1.4</span></h2><p><span>发布时间:2018-05-10</span></p><p><span>更新内容:</span></p><p><span>1.上传功能优化。</span></p></div>
</body>
</html>
\ No newline at end of file
......@@ -56,6 +56,9 @@ typedef NS_ENUM(NSUInteger, DWPlayerViewLoadStyle) {
//加载失败
- (void)videoPlayer:(DWPlayerView *)playerView didFailWithError:(NSError *)error;
//AVPlayerLayer对象发生改变时回调
- (void)videoPlayer:(DWPlayerView *)playerView ChangePlayerLayer:(AVPlayerLayer *)playerLayer;
@end
@interface DWPlayerView : UIView
......@@ -198,13 +201,20 @@ typedef NS_ENUM(NSUInteger, DWPlayerViewLoadStyle) {
-(void)switchSparPlayLine;
/**
设置是否允许后台播放,目前只支持音频后台播放
设置是否允许后台播放
@param play 是否允许后台播放
*/
- (void)setPlayInBackground:(BOOL)play;
/**
设置是否画中画模式
@param play 是否画中画模式
*/
- (void)setPictureInPicture:(BOOL)openPIP API_AVAILABLE(ios(9.0));
/**
切换倍速
......
......@@ -26,5 +26,5 @@
#import "DWVodAdInfoModel.h"
//版本号
#define SDK_VERSION @"4.2.7"
#define SDK_VERSION @"4.3.0"
No preview for this file type
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