Commit 5ea58529 authored by zhaowl123's avatar zhaowl123
Browse files

4.14.4

parent 9d79404f
No preview for this file type
......@@ -403,27 +403,27 @@
B88562A41DED1AC8008D1763 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B88562A31DED1AC8008D1763 /* SystemConfiguration.framework */; };
DD25727D24F79DED00D9BB55 /* icon_exercises_close@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = DD25727B24F79DED00D9BB55 /* icon_exercises_close@3x.png */; };
DD25727E24F79DED00D9BB55 /* icon_exercises_close@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DD25727C24F79DED00D9BB55 /* icon_exercises_close@2x.png */; };
DD383817264E5844006A48EE /* vrlibraw.bundle in Resources */ = {isa = PBXBuildFile; fileRef = DD383815264E5844006A48EE /* vrlibraw.bundle */; };
DD383818264E5844006A48EE /* DWResource.bundle in Resources */ = {isa = PBXBuildFile; fileRef = DD383816264E5844006A48EE /* DWResource.bundle */; };
DD383819264E5848006A48EE /* CCVodSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD383811264E5839006A48EE /* CCVodSDK.framework */; };
DD38381A264E5848006A48EE /* CCVodSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DD383811264E5839006A48EE /* CCVodSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DD38381B264E584D006A48EE /* HDBaseUtils.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD383812264E5839006A48EE /* HDBaseUtils.framework */; };
DD38381C264E584D006A48EE /* HDBaseUtils.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DD383812264E5839006A48EE /* HDBaseUtils.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DD54280A250B55AB0097614C /* icon_ad_mute_select@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DD542806250B55AA0097614C /* icon_ad_mute_select@2x.png */; };
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 */; };
DDA4D826262565D0006EAA15 /* DWResource.bundle in Resources */ = {isa = PBXBuildFile; fileRef = DDA4D824262565CF006EAA15 /* DWResource.bundle */; };
DDA4D827262565D0006EAA15 /* vrlibraw.bundle in Resources */ = {isa = PBXBuildFile; fileRef = DDA4D825262565CF006EAA15 /* vrlibraw.bundle */; };
DDA4D82926256623006EAA15 /* CCVodSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDA4D820262565BF006EAA15 /* CCVodSDK.framework */; };
DDA4D82A26256623006EAA15 /* CCVodSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DDA4D820262565BF006EAA15 /* CCVodSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DDA4D82C26256625006EAA15 /* HDBaseUtils.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDA4D821262565BF006EAA15 /* HDBaseUtils.framework */; };
DDA4D82D26256625006EAA15 /* HDBaseUtils.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DDA4D821262565BF006EAA15 /* HDBaseUtils.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
DDA4D82B26256623006EAA15 /* Embed Frameworks */ = {
DD0F24D3255E22B000DA2705 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
DDA4D82A26256623006EAA15 /* CCVodSDK.framework in Embed Frameworks */,
DDA4D82D26256625006EAA15 /* HDBaseUtils.framework in Embed Frameworks */,
DD38381A264E5848006A48EE /* CCVodSDK.framework in Embed Frameworks */,
DD38381C264E584D006A48EE /* HDBaseUtils.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
......@@ -989,14 +989,14 @@
B88562A31DED1AC8008D1763 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
DD25727B24F79DED00D9BB55 /* icon_exercises_close@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_exercises_close@3x.png"; sourceTree = "<group>"; };
DD25727C24F79DED00D9BB55 /* icon_exercises_close@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_exercises_close@2x.png"; sourceTree = "<group>"; };
DD383811264E5839006A48EE /* CCVodSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CCVodSDK.framework; sourceTree = "<group>"; };
DD383812264E5839006A48EE /* HDBaseUtils.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = HDBaseUtils.framework; sourceTree = "<group>"; };
DD383815264E5844006A48EE /* vrlibraw.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = vrlibraw.bundle; path = CCVodSDK.framework/vrlibraw.bundle; sourceTree = "<group>"; };
DD383816264E5844006A48EE /* DWResource.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = DWResource.bundle; path = CCVodSDK.framework/DWResource.bundle; sourceTree = "<group>"; };
DD542806250B55AA0097614C /* icon_ad_mute_select@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_ad_mute_select@2x.png"; sourceTree = "<group>"; };
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>"; };
DDA4D820262565BF006EAA15 /* CCVodSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CCVodSDK.framework; sourceTree = "<group>"; };
DDA4D821262565BF006EAA15 /* HDBaseUtils.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = HDBaseUtils.framework; sourceTree = "<group>"; };
DDA4D824262565CF006EAA15 /* DWResource.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = DWResource.bundle; path = CCVodSDK.framework/DWResource.bundle; sourceTree = "<group>"; };
DDA4D825262565CF006EAA15 /* 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 = (
DDA4D82C26256625006EAA15 /* HDBaseUtils.framework in Frameworks */,
DD38381B264E584D006A48EE /* 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 */,
DDA4D82926256623006EAA15 /* CCVodSDK.framework in Frameworks */,
DD383819264E5848006A48EE /* 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 */,
DDA4D81F262565BF006EAA15 /* SDK */,
DD383810264E5839006A48EE /* SDK */,
0434420D225F0EDD003F7EC1 /* Classes */,
B547EC5818E033FB00BC980C /* DWAppDelegate.h */,
B547EC5918E033FB00BC980C /* DWAppDelegate.m */,
......@@ -1874,13 +1874,13 @@
name = "Supporting Files";
sourceTree = "<group>";
};
DDA4D81F262565BF006EAA15 /* SDK */ = {
DD383810264E5839006A48EE /* SDK */ = {
isa = PBXGroup;
children = (
DDA4D824262565CF006EAA15 /* DWResource.bundle */,
DDA4D825262565CF006EAA15 /* vrlibraw.bundle */,
DDA4D820262565BF006EAA15 /* CCVodSDK.framework */,
DDA4D821262565BF006EAA15 /* HDBaseUtils.framework */,
DD383816264E5844006A48EE /* DWResource.bundle */,
DD383815264E5844006A48EE /* vrlibraw.bundle */,
DD383811264E5839006A48EE /* CCVodSDK.framework */,
DD383812264E5839006A48EE /* HDBaseUtils.framework */,
);
path = SDK;
sourceTree = "<group>";
......@@ -1895,8 +1895,8 @@
B547EC4218E033FB00BC980C /* Sources */,
B547EC4318E033FB00BC980C /* Frameworks */,
B547EC4418E033FB00BC980C /* Resources */,
DDA4D82B26256623006EAA15 /* Embed Frameworks */,
DDA4D828262565D6006EAA15 /* ShellScript */,
DD0F24D3255E22B000DA2705 /* Embed Frameworks */,
DD3837EA264E113A006A48EE /* ShellScript */,
);
buildRules = (
);
......@@ -2026,6 +2026,7 @@
0491DCF824B5604300DF40C7 /* icon_barrage_close@3x.png in Resources */,
0491DD2424B5604300DF40C7 /* icon_barrage_color_01@2x.png in Resources */,
04FFA9EA22647579008C2713 /* icon_play_full@2x.png in Resources */,
DD383817264E5844006A48EE /* vrlibraw.bundle in Resources */,
DD54280C250B55AB0097614C /* icon_ad_mute@2x.png in Resources */,
0491DCF224B5604300DF40C7 /* icon_barrage_set_return@3x.png in Resources */,
0491DD0F24B5604300DF40C7 /* icon_barrage_color_05@3x.png in Resources */,
......@@ -2056,7 +2057,6 @@
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 */,
DDA4D826262565D0006EAA15 /* 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 */,
......@@ -2090,6 +2090,7 @@
0414B00623F51AA0002C7F7D /* icon_pip@2x.png in Resources */,
04FFA9F822647C84008C2713 /* icon_play_gif_normal@3x.png in Resources */,
04F0B79F22602D8F0097C3CB /* icon_return_black@2x.png in Resources */,
DD383818264E5844006A48EE /* DWResource.bundle in Resources */,
043D018722B76F1C008589DA /* icon_exercises_statistics_error@3x.png in Resources */,
0491DD0124B5604300DF40C7 /* icon_barrage_set_normal@2x.png in Resources */,
04FFA9D622647579008C2713 /* icon_play_return@3x.png in Resources */,
......@@ -2154,7 +2155,6 @@
04346AC0249720C6005A3396 /* brightness.png in Resources */,
04B7A65F226B0E5E00951983 /* icon_question_single_select@2x.png in Resources */,
0491DD1F24B5604300DF40C7 /* icon_barrage_color_select@3x.png in Resources */,
DDA4D827262565D0006EAA15 /* 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,9 +2204,9 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
DDA4D828262565D6006EAA15 /* ShellScript */ = {
DD3837EA264E113A006A48EE /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
buildActionMask = 8;
files = (
);
inputFileListPaths = (
......@@ -2217,7 +2217,7 @@
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
runOnlyForDeploymentPostprocessing = 1;
shellPath = /bin/sh;
shellScript = "# This script loops through the frameworks embedded in the application and \n# removes unused architectures. \nAPP_PATH=\"${TARGET_BUILD_DIR}/${WRAPPER_NAME}\"\n​\nfind \"$APP_PATH\" -name '*.framework' -type d | while read -r FRAMEWORK \ndo \nFRAMEWORK_EXECUTABLE_NAME=$(defaults read \"$FRAMEWORK/Info.plist\" CFBundleExecutable) \nFRAMEWORK_EXECUTABLE_PATH=\"$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME\" \necho \"Executable is $FRAMEWORK_EXECUTABLE_PATH\" \n \nEXTRACTED_ARCHS=() \n \nfor ARCH in $ARCHS \ndo \necho \"Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME\" \nlipo -extract \"$ARCH\" \"$FRAMEWORK_EXECUTABLE_PATH\" -o \"$FRAMEWORK_EXECUTABLE_PATH-$ARCH\" \nEXTRACTED_ARCHS+=(\"$FRAMEWORK_EXECUTABLE_PATH-$ARCH\") \ndone \n​\necho \"Merging extracted architectures: ${ARCHS}\" \nlipo -o \"$FRAMEWORK_EXECUTABLE_PATH-merged\" -create \"${EXTRACTED_ARCHS[@]}\" \nrm \"${EXTRACTED_ARCHS[@]}\" \n \necho \"Replacing original executable with thinned version\" \nrm \"$FRAMEWORK_EXECUTABLE_PATH\" \nmv \"$FRAMEWORK_EXECUTABLE_PATH-merged\" \"$FRAMEWORK_EXECUTABLE_PATH\" \n \ndone\n";
};
......@@ -2511,6 +2511,7 @@
PROVISIONING_PROFILE_SPECIFIER = vodDemoDevelopment;
TARGETED_DEVICE_FAMILY = "1,2";
USER_HEADER_SEARCH_PATHS = "";
VALIDATE_WORKSPACE = YES;
WRAPPER_EXTENSION = app;
};
name = Debug;
......@@ -2559,6 +2560,7 @@
PROVISIONING_PROFILE_SPECIFIER = vodDemoDevelopment;
TARGETED_DEVICE_FAMILY = "1,2";
USER_HEADER_SEARCH_PATHS = "";
VALIDATE_WORKSPACE = YES;
WRAPPER_EXTENSION = app;
};
name = Release;
......
......@@ -96,7 +96,7 @@
{
//请自行替换数据
NSArray * videos = @[];
for (int i = 0; i < videos.count; i++) {
DWVodModel * vodModel = [[DWVodModel alloc]init];
vodModel.videoId = [videos objectAtIndex:i];
......@@ -226,6 +226,7 @@
UIBarButtonItem * leftItem = [[UIBarButtonItem alloc]initWithCustomView:userInfoButton];
self.navigationItem.leftBarButtonItem = leftItem;
UIButton * uploadButton = [UIButton buttonWithType:UIButtonTypeCustom];
[uploadButton setImage:[UIImage imageNamed:@"icon_upload.png"] forState:UIControlStateNormal];
uploadButton.frame = CGRectMake(0, 0, 40, 40);
......
......@@ -68,6 +68,9 @@
//是否开启动感视频,默认YES
@property(nonatomic,assign)BOOL allowImpact;
//是否开启自动播放功能,默认YES
@property(nonatomic,assign)BOOL autoPlay;
//字幕显示模式, -1 前端不做控制,使用后台设置 ; 0 固定模式 ; 1 自适应模式,默认-1
@property(nonatomic,assign)NSInteger subtitleAdaptiveModel;
......@@ -216,6 +219,9 @@
//**************************** 动感视频 ****************************
@property(nonatomic,strong)DWImpactRemindView * impactRemindView;
//**************************** 视频封面图 ****************************
@property(nonatomic,strong)UIImageView * imgImageView;
@end
@implementation DWVodPlayerView
......@@ -257,6 +263,9 @@ static CGFloat barrageBgHeight = 40;
//是否开启画中画
self.allowPictureInPicture = NO;
//是否自动播放
self.autoPlay = YES;
//是否开启防拖拽功能,默认关闭
self.allowSlider = NO;
self.sliderTime = 0;
......@@ -362,6 +371,9 @@ static CGFloat barrageBgHeight = 40;
self.playRepeat = NO;
//重置UI
[self resetUI];
/*
//播放,带自定义logo设置
DWVideoLogoModel * videoLogo = [[DWVideoLogoModel alloc]init];
......@@ -376,8 +388,6 @@ static CGFloat barrageBgHeight = 40;
[self.playerView playVodViedo:videoModel withCustomId:nil];
[self play];
//处理视频清晰度数据
[self dealQualityArray];
......@@ -386,6 +396,9 @@ static CGFloat barrageBgHeight = 40;
//开启跑马灯功能
[self initMarqueeView];
//在线视频加载封面图
[self loadImgWithURL:self.videoModel.img];
}
-(void)playLocalVideo:(DWDownloadModel *)downloadModel
......@@ -415,8 +428,7 @@ static CGFloat barrageBgHeight = 40;
}
[self.playerView playLocalVideo:downloadModel];
[self play];
//开启跑马灯功能
[self initMarqueeView];
}
......@@ -441,6 +453,10 @@ static CGFloat barrageBgHeight = 40;
-(void)play
{
if (self.readyToPlay && !self.imgImageView.hidden) {
[self removeImg];
}
self.playOrPauseButton.selected = YES;
self.windowsPlayOrPauseButton.selected = self.playOrPauseButton.selected;
[self.playerView play];
......@@ -621,7 +637,7 @@ static CGFloat barrageBgHeight = 40;
[_bottomFuncBgView mas_updateConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(@0);
make.height.equalTo(@(self.areaInsets.bottom + bottomFuncBgHeight + barrageBgHeight));
make.height.equalTo(@(self.areaInsets.bottom + bottomFuncBgHeight + barrageBgHeight + 5));
}];
}else{
......@@ -631,8 +647,8 @@ static CGFloat barrageBgHeight = 40;
}];
[_bottomFuncBgView mas_updateConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(@(self.areaInsets.bottom + bottomFuncBgHeight + barrageBgHeight));
make.height.equalTo(@(self.areaInsets.bottom + bottomFuncBgHeight + barrageBgHeight));
make.bottom.equalTo(@(self.areaInsets.bottom + bottomFuncBgHeight + barrageBgHeight + 5));
make.height.equalTo(@(self.areaInsets.bottom + bottomFuncBgHeight + barrageBgHeight + 5));
}];
}
......@@ -675,7 +691,7 @@ static CGFloat barrageBgHeight = 40;
[self.currentLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(@20);
make.top.equalTo(@((barrageBgHeight - self.titleLabelSize.height) / 2.0));
make.top.equalTo(@((bottomFuncBgHeight - self.titleLabelSize.height) / 2.0));
make.height.equalTo(@(self.titleLabelSize.height));
make.width.equalTo(@(self.titleLabelSize.width));
}];
......@@ -1083,6 +1099,10 @@ static CGFloat barrageBgHeight = 40;
self.playRepeat = NO;
if (!self.imgImageView.hidden) {
[self removeImg];
}
//如果VR视图存在,需要重新创建
if (self.vrView) {
[self.vrView removeFromSuperview];
......@@ -1134,6 +1154,7 @@ static CGFloat barrageBgHeight = 40;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self play];
});
// [self play];
}
......@@ -1391,6 +1412,26 @@ static CGFloat barrageBgHeight = 40;
return sliderTime;
}
//读取原先的播放时间 用oldTimeScrub方法
-(void)oldTimeScrubWithTime:(CGFloat)time
{
[self.playerView oldTimeScrub:time];
self.playOrPauseButton.selected = self.autoPlay;
self.windowsPlayOrPauseButton.selected = self.autoPlay;
}
//重置UI状态
-(void)resetUI
{
self.playOrPauseButton.selected = self.autoPlay;
self.windowsPlayOrPauseButton.selected = self.autoPlay;
self.currentLabel.text = @"000:00";
self.slider.value = 0.0;
self.slider.bufferValue = 0.0;
self.totalLabel.text = @"000:00";
}
#pragma mark - func Timer
-(void)initFuncGesture
{
......@@ -1431,7 +1472,7 @@ static CGFloat barrageBgHeight = 40;
}
-(void)destroyFuncTimer
{
{
if (self.funcTimer) {
[self.funcTimer invalidate];
self.funcTimer = nil;
......@@ -1454,8 +1495,8 @@ static CGFloat barrageBgHeight = 40;
{
CGFloat topHeight = self.isFull ? 20 + topFuncBgHeight : self.areaInsets.top + topFuncBgHeight;
CGFloat bottomHeight = self.isFull ? self.areaInsets.bottom + bottomFuncBgHeight + barrageBgHeight : bottomFuncBgHeight;
CGFloat bottomHeight = self.isFull ? self.areaInsets.bottom + bottomFuncBgHeight + barrageBgHeight + 5 : bottomFuncBgHeight;
UIDeviceOrientation orientation = [UIDevice currentDevice].orientation;
UIInterfaceOrientation interfaceOrientation = (UIInterfaceOrientation)orientation;
......@@ -2042,16 +2083,16 @@ static CGFloat barrageBgHeight = 40;
//播放/暂停
-(void)playOrPauseButtonAction
{
if (!self.readyToPlay) {
return;
}
if (self.playOrPauseButton.selected) {
[self pause];
}else{
[self play];
}
if (!self.readyToPlay) {
return;
}
//判断当前是否有显示问答,课堂练习等
if (self.visitorCollectView || self.exercisesAlertView || self.exercisesView || _feedBackView || _questionView) {
return;
......@@ -3284,6 +3325,35 @@ static CGFloat barrageBgHeight = 40;
}
}
#pragma mark - 视频封面图
-(void)loadImgWithURL:(NSString *)imgUrl
{
self.imgImageView.hidden = NO;
//加载图片
//同一个视频,封面图片的地址不会改变,如果使用SDWebImage等第三方框架加载图片,要注意图片缓存的问题。
dispatch_async(dispatch_queue_create("PLAYERIMGDOWNLOAD", NULL), ^{
NSData * imgData = [[NSData alloc]initWithContentsOfURL:[NSURL URLWithString:imgUrl]];
if (!imgData) {
return;
}
UIImage * img = [UIImage imageWithData:imgData];
dispatch_async(dispatch_get_main_queue(), ^{
if (!_imgImageView) {
return;
}
self.imgImageView.image = img;
});
});
}
-(void)removeImg
{
self.imgImageView.hidden = YES;
self.imgImageView.image = nil;
}
#pragma mark - DWPlayerSettingViewDelegate
-(void)playerSettingViewStyle:(DWVodSettingStyle)style AndSelectIndex:(NSInteger)selectIndex
{
......@@ -3501,6 +3571,10 @@ static CGFloat barrageBgHeight = 40;
[self hideHudWithMessage:nil];
if (self.autoPlay) {
[self removeImg];
}
if (self.videoModel.vrmode == 1 || self.downloadModel.vrMode) {
//设置VR
[self initVRConfig];
......@@ -3532,9 +3606,11 @@ static CGFloat barrageBgHeight = 40;
self.sliderTime = [self readSliderWithVideoID:self.downloadModel ? self.downloadModel.videoId : self.vodModel.videoId];
//读取原先的播放时间 用oldTimeScrub方法
[self.playerView oldTimeScrub:self.switchTime];
[self play];
[self oldTimeScrubWithTime:self.switchTime];
if (_isSwitchquality) {
[self play];
}
//同步视频总时间
self.pan.duration = CMTimeGetSeconds(self.playerView.player.currentItem.duration);
......@@ -3917,21 +3993,26 @@ static CGFloat barrageBgHeight = 40;
self.playerView = [[DWPlayerView alloc]init];
self.playerView.timeOutLoad = 30;
self.playerView.timeOutBuffer = 30;
// self.playerView.loadStyle = DWPlayerViewLoadStyleImmediately;
// self.playerView.loadStyle = DWPlayerViewLoadStyleImmediately;
self.playerView.forwardBufferDuration = 30;
self.playerView.delegate = self;
[self.playerView setPlayInBackground:self.allowBackgroundPlay];
[self.playerView setPictureInPicture:self.allowPictureInPicture];
self.playerView.autoPlay = self.autoPlay;
//是否开启防录屏
// self.playerView.videoProtect = YES;
[self insertSubview:self.playerView atIndex:0];
[_playerView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.and.top.equalTo(@0);
make.width.equalTo(self);
make.bottom.equalTo(@(-barrageBgHeight));
}];
[self.playerView addSubview:self.imgImageView];
[_imgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(_playerView);
}];
}
//音频播放view
......@@ -4275,6 +4356,7 @@ static CGFloat barrageBgHeight = 40;
[_playOrPauseButton setImage:[UIImage imageNamed:@"icon_play.png"] forState:UIControlStateNormal];
[_playOrPauseButton setImage:[UIImage imageNamed:@"icon_pause.png"] forState:UIControlStateSelected];
[_playOrPauseButton addTarget:self action:@selector(playOrPauseButtonAction) forControlEvents:UIControlEventTouchUpInside];
_playOrPauseButton.selected = self.autoPlay;
}
return _playOrPauseButton;
}
......@@ -4685,6 +4767,8 @@ static CGFloat barrageBgHeight = 40;
[_windowsPlayOrPauseButton setBackgroundImage:[UIImage imageNamed:@"icon_windows_play.png"] forState:UIControlStateNormal];
[_windowsPlayOrPauseButton setBackgroundImage:[UIImage imageNamed:@"icon_windows_pause.png"] forState:UIControlStateSelected];
[_windowsPlayOrPauseButton addTarget:self action:@selector(windowsPlayOrPauseButtonAction) forControlEvents:UIControlEventTouchUpInside];
_windowsPlayOrPauseButton.selected = self.autoPlay;
[self addSubview:_windowsPlayOrPauseButton];
[_windowsPlayOrPauseButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.mas_centerX).offset(-7.5);
......@@ -4746,6 +4830,17 @@ static CGFloat barrageBgHeight = 40;
return _impactRemindView;
}
-(UIImageView *)imgImageView
{
if (!_imgImageView) {
_imgImageView = [[UIImageView alloc]init];
_imgImageView.contentMode = UIViewContentModeScaleAspectFit;
_imgImageView.backgroundColor = [UIColor blackColor];
_imgImageView.hidden = YES;
}
return _imgImageView;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
......
......@@ -27,7 +27,7 @@
self.DWAccount_userId = @"391E6E3340A00767";
self.DWAccount_apikey = @"T8WdOUuvFEiOsou1xjDr4U73v12M7iNa";
self.isOpenAd = [[[NSUserDefaults standardUserDefaults] objectForKey:@"isOpenAD"] boolValue];
}
return self;
......
//版本号
#define SDK_VERSION @"4.14.3"
#define SDK_VERSION @"4.14.4"
#import <CCVodSDK/DWGIFManager.h>
#import <CCVodSDK/DWAdInfo.h>
......
......@@ -122,6 +122,11 @@ typedef NS_ENUM(NSUInteger, DWPlayerViewLoadStyle) {
*/
@property(nonatomic,assign)BOOL muted;
/**
* @brief 是否自动播放,默认为YES
*/
@property(nonatomic,assign)BOOL autoPlay;
/**
* @brief 视频加载超时时间,默认30s
*/
......
......@@ -54,6 +54,11 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property(nonatomic, strong, readonly)NSString * shareurl;
/**
* @brief 视频封面图地址
*/
@property(nonatomic, strong, readonly)NSString * img;
/**
* @brief 视频清晰度
*/
......
......@@ -1837,6 +1837,6 @@ footer.ty-footer {
</style>
</head>
<body class='typora-export' >
<div id='write' class = ''><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可以与获得场景视频云服务进行对接,在iOS端使用获得场景视频的点播功能。</span></p><h2><a name="设备及开发环境" class="md-header-anchor"></a><span>设备及开发环境</span></h2><p><span>Xcode 集成开发环境。</span></p><p><span>iOS 运行环境:iOS 9.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>支持音视频上传、断点下载、批量下载,后台下载功能</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>自定义LOGO</span></td><td style='text-align:left;' ><span>支持在线,离线视频播放自定义LOGO显示</span></td></tr></tbody></table></figure><p>&nbsp;</p></div>
<div id='write' class = ''><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可以与获得场景视频云服务进行对接,在iOS端使用获得场景视频的点播功能。</span></p><h2><a name="设备及开发环境" class="md-header-anchor"></a><span>设备及开发环境</span></h2><p><span>Xcode 集成开发环境。</span></p><p><span>iOS 运行环境:iOS 9.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>支持音视频上传、断点下载、批量下载,后台下载功能</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>自定义LOGO</span></td><td style='text-align:left;' ><span>支持在线,离线视频播放自定义LOGO显示</span></td></tr><tr><td><span>视频封面图</span></td><td style='text-align:left;' ><span>支持自定义封面图显示</span></td></tr></tbody></table></figure><p>&nbsp;</p></div>
</body>
</html>
\ No newline at end of file