Commit 2dc44792 authored by Hanruisong's avatar Hanruisong
Browse files

feat: 更新到4.14.0

1.新增字幕自适应功能。
2.完善SDK编码规范。
parent cd58867c
......@@ -407,23 +407,23 @@
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 */; };
DDDFFE9A25B6BA09009C54EE /* vrlibraw.bundle in Resources */ = {isa = PBXBuildFile; fileRef = DDDFFE9825B6BA09009C54EE /* vrlibraw.bundle */; };
DDDFFE9B25B6BA09009C54EE /* DWResource.bundle in Resources */ = {isa = PBXBuildFile; fileRef = DDDFFE9925B6BA09009C54EE /* DWResource.bundle */; };
DDDFFE9C25B6BA13009C54EE /* HDBaseUtils.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDDFFE9525B6BA00009C54EE /* HDBaseUtils.framework */; };
DDDFFE9D25B6BA13009C54EE /* HDBaseUtils.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DDDFFE9525B6BA00009C54EE /* HDBaseUtils.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DDDFFE9E25B6BA15009C54EE /* CCVodSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDDFFE9425B6BA00009C54EE /* CCVodSDK.framework */; };
DDDFFE9F25B6BA15009C54EE /* CCVodSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DDDFFE9425B6BA00009C54EE /* CCVodSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DDCB1514260200930095BBD8 /* vrlibraw.bundle in Resources */ = {isa = PBXBuildFile; fileRef = DDCB1512260200930095BBD8 /* vrlibraw.bundle */; };
DDCB1515260200930095BBD8 /* DWResource.bundle in Resources */ = {isa = PBXBuildFile; fileRef = DDCB1513260200930095BBD8 /* DWResource.bundle */; };
DDCB15162602009E0095BBD8 /* HDBaseUtils.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDCB150F260200860095BBD8 /* HDBaseUtils.framework */; };
DDCB15172602009E0095BBD8 /* HDBaseUtils.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DDCB150F260200860095BBD8 /* HDBaseUtils.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DDCB1519260200A00095BBD8 /* CCVodSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDCB150E260200860095BBD8 /* CCVodSDK.framework */; };
DDCB151A260200A00095BBD8 /* CCVodSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DDCB150E260200860095BBD8 /* CCVodSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
DD0F24D3255E22B000DA2705 /* Embed Frameworks */ = {
DDCB15182602009F0095BBD8 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
DDDFFE9D25B6BA13009C54EE /* HDBaseUtils.framework in Embed Frameworks */,
DDDFFE9F25B6BA15009C54EE /* CCVodSDK.framework in Embed Frameworks */,
DDCB15172602009E0095BBD8 /* HDBaseUtils.framework in Embed Frameworks */,
DDCB151A260200A00095BBD8 /* CCVodSDK.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>"; };
DDDFFE9425B6BA00009C54EE /* CCVodSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CCVodSDK.framework; sourceTree = "<group>"; };
DDDFFE9525B6BA00009C54EE /* HDBaseUtils.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = HDBaseUtils.framework; sourceTree = "<group>"; };
DDDFFE9825B6BA09009C54EE /* vrlibraw.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = vrlibraw.bundle; path = CCVodSDK.framework/vrlibraw.bundle; sourceTree = "<group>"; };
DDDFFE9925B6BA09009C54EE /* DWResource.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = DWResource.bundle; path = CCVodSDK.framework/DWResource.bundle; sourceTree = "<group>"; };
DDCB150E260200860095BBD8 /* CCVodSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CCVodSDK.framework; sourceTree = "<group>"; };
DDCB150F260200860095BBD8 /* HDBaseUtils.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = HDBaseUtils.framework; sourceTree = "<group>"; };
DDCB1512260200930095BBD8 /* vrlibraw.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = vrlibraw.bundle; path = CCVodSDK.framework/vrlibraw.bundle; sourceTree = "<group>"; };
DDCB1513260200930095BBD8 /* DWResource.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = DWResource.bundle; path = CCVodSDK.framework/DWResource.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 = (
DDDFFE9C25B6BA13009C54EE /* HDBaseUtils.framework in Frameworks */,
DDCB15162602009E0095BBD8 /* 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 */,
DDDFFE9E25B6BA15009C54EE /* CCVodSDK.framework in Frameworks */,
DDCB1519260200A00095BBD8 /* 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 */,
DDDFFE9325B6BA00009C54EE /* SDK */,
DDCB150D260200860095BBD8 /* SDK */,
0434420D225F0EDD003F7EC1 /* Classes */,
B547EC5818E033FB00BC980C /* DWAppDelegate.h */,
B547EC5918E033FB00BC980C /* DWAppDelegate.m */,
......@@ -1874,13 +1874,13 @@
name = "Supporting Files";
sourceTree = "<group>";
};
DDDFFE9325B6BA00009C54EE /* SDK */ = {
DDCB150D260200860095BBD8 /* SDK */ = {
isa = PBXGroup;
children = (
DDDFFE9925B6BA09009C54EE /* DWResource.bundle */,
DDDFFE9825B6BA09009C54EE /* vrlibraw.bundle */,
DDDFFE9425B6BA00009C54EE /* CCVodSDK.framework */,
DDDFFE9525B6BA00009C54EE /* HDBaseUtils.framework */,
DDCB1513260200930095BBD8 /* DWResource.bundle */,
DDCB1512260200930095BBD8 /* vrlibraw.bundle */,
DDCB150E260200860095BBD8 /* CCVodSDK.framework */,
DDCB150F260200860095BBD8 /* HDBaseUtils.framework */,
);
path = SDK;
sourceTree = "<group>";
......@@ -1895,8 +1895,8 @@
B547EC4218E033FB00BC980C /* Sources */,
B547EC4318E033FB00BC980C /* Frameworks */,
B547EC4418E033FB00BC980C /* Resources */,
DD0F24D3255E22B000DA2705 /* Embed Frameworks */,
DDDFFEA025B6BA2D009C54EE /* ShellScript */,
DDCB15182602009F0095BBD8 /* Embed Frameworks */,
DDCB151B260200C00095BBD8 /* ShellScript */,
);
buildRules = (
);
......@@ -2026,7 +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 */,
DDDFFE9A25B6BA09009C54EE /* vrlibraw.bundle in Resources */,
DDCB1514260200930095BBD8 /* 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 */,
......@@ -2090,7 +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 */,
DDDFFE9B25B6BA09009C54EE /* DWResource.bundle in Resources */,
DDCB1515260200930095BBD8 /* 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 */,
......@@ -2204,7 +2204,7 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
DDDFFEA025B6BA2D009C54EE /* ShellScript */ = {
DDCB151B260200C00095BBD8 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
......
......@@ -68,6 +68,9 @@
//是否开启动感视频,默认YES
@property(nonatomic,assign)BOOL allowImpact;
//字幕显示模式, -1 前端不做控制,使用后台设置 ; 0 固定模式 ; 1 自适应模式,默认-1
@property(nonatomic,assign)NSInteger subtitleAdaptiveModel;
@property(nonatomic,assign)UIEdgeInsets areaInsets;
@property(nonatomic,assign)BOOL isFull;
@property(nonatomic,assign)BOOL isVideo;//当前播放模式 视频 / 音频
......@@ -258,6 +261,8 @@ static CGFloat barrageBgHeight = 40;
self.allowSlider = NO;
self.sliderTime = 0;
self.subtitleAdaptiveModel = 1;
self.isShowAd = NO;
self.allowImpact = [[[NSUserDefaults standardUserDefaults] objectForKey:@"allowImpact"] boolValue];
......@@ -2569,8 +2574,10 @@ static CGFloat barrageBgHeight = 40;
self.subtitleView = nil;
}
self.subtitleView = [[DWSubtitleView alloc]initWithSubtitle:self.videoModel.subtitle Subtitle2:self.videoModel.subtitle2 DefauleSubtitle:self.videoModel.defaultSubtitle AndLocalFile:NO];
self.subtitleView = [[DWSubtitleView alloc]initWithSubtitle:self.videoModel.subtitle Subtitle2:self.videoModel.subtitle2 DefauleSubtitle:self.videoModel.defaultSubtitle subtitleModel:self.subtitleAdaptiveModel == -1 ? self.videoModel.subtitlemodel : self.subtitleAdaptiveModel AndLocalFile:NO];
[self.playerView addSubview:self.subtitleView];
[self.subtitleView screenRotate:self.isFull];
[self switchSubtitleStyle];
}else{
//离线视频
......@@ -2618,8 +2625,10 @@ static CGFloat barrageBgHeight = 40;
self.subtitleView = nil;
}
self.subtitleView = [[DWSubtitleView alloc]initWithSubtitle:self.downloadModel.subtitle Subtitle2:self.downloadModel.subtitle2 DefauleSubtitle:self.downloadModel.defaultSubtitle AndLocalFile:YES];
self.subtitleView = [[DWSubtitleView alloc]initWithSubtitle:self.downloadModel.subtitle Subtitle2:self.downloadModel.subtitle2 DefauleSubtitle:self.downloadModel.defaultSubtitle subtitleModel:self.subtitleAdaptiveModel == -1 ? self.downloadModel.subtitlemodel : self.subtitleAdaptiveModel AndLocalFile:YES];
[self.playerView addSubview:self.subtitleView];
[self.subtitleView screenRotate:self.isFull];
[self switchSubtitleStyle];
}
......
......@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface DWSubtitleView : UIView
//根据字幕生成view
-(instancetype)initWithSubtitle:(DWVideoSubtitleModel *)subtitle Subtitle2:(DWVideoSubtitleModel *)subtitle2 DefauleSubtitle:(NSInteger)defaultSubtitle AndLocalFile:(BOOL)isLocal;
-(instancetype)initWithSubtitle:(DWVideoSubtitleModel *)subtitle Subtitle2:(DWVideoSubtitleModel *)subtitle2 DefauleSubtitle:(NSInteger)defaultSubtitle subtitleModel:(NSInteger)subtitleModel AndLocalFile:(BOOL)isLocal;
//切换横竖屏
-(void)screenRotate:(BOOL)isFull;
......
......@@ -20,6 +20,9 @@ typedef enum : NSUInteger {
@property(nonatomic,assign)BOOL isFull;
@property(nonatomic,assign)CGSize playerSize;
//0固定字号 1自适应模式
@property(nonatomic,assign)NSInteger subtitleModel;
//字幕相关的数据 subtitle永远是下方显示的字幕数据 subtitle2可能是nil
@property(nonatomic,strong)DWVideoSubtitleModel * subtitle;
@property(nonatomic,strong)DWVideoSubtitleModel * subtitle2;
......@@ -64,8 +67,7 @@ typedef enum : NSUInteger {
@implementation DWSubtitleView
//-(instancetype)initWithSubtitle:(DWVideoSubtitleModel *)subtitle Subtitle2:(DWVideoSubtitleModel *)subtitle2 WithDefauleSubtitle:(NSInteger)defaultSubtitle
-(instancetype)initWithSubtitle:(DWVideoSubtitleModel *)subtitle Subtitle2:(DWVideoSubtitleModel *)subtitle2 DefauleSubtitle:(NSInteger)defaultSubtitle AndLocalFile:(BOOL)isLocal
-(instancetype)initWithSubtitle:(DWVideoSubtitleModel *)subtitle Subtitle2:(DWVideoSubtitleModel *)subtitle2 DefauleSubtitle:(NSInteger)defaultSubtitle subtitleModel:(NSInteger)subtitleModel AndLocalFile:(BOOL)isLocal
{
if (self == [super init]) {
......@@ -80,6 +82,8 @@ typedef enum : NSUInteger {
self.subtitle = subtitle;
self.subtitle2 = subtitle2;
self.subtitleModel = subtitleModel;
if (!self.subtitle && !self.subtitle2) {
self.style = DWSubtitleStyleNone;
}else if (self.subtitle && self.subtitle2){
......@@ -107,6 +111,8 @@ typedef enum : NSUInteger {
-(void)screenRotate:(BOOL)isFull
{
self.isFull = isFull;
//重新设置字体
[self setTextFont];
//重新布局
[self setDefaultFrame:self.isFull];
//修改默认字幕
......@@ -222,25 +228,47 @@ typedef enum : NSUInteger {
//阴影颜色
self.shadowColor = [DWTools colorWithHexString:self.subtitle.surroundColor];
//距离底部偏移
//设置字号
[self setTextFont];
//距离底部偏移
if (self.style == DWSubtitleStyleDouble) {
CGFloat fontSize1 = self.subtitle.size / 2.0;
CGFloat fontSize2 = self.subtitle2.size / 2.0;
self.font1 = [UIFont fontWithName:self.fontName size:fontSize1] ? [UIFont fontWithName:self.fontName size:fontSize1] : [UIFont systemFontOfSize:fontSize1];
self.font2 = [UIFont fontWithName:self.fontName size:fontSize2] ? [UIFont fontWithName:self.fontName size:fontSize2] : [UIFont systemFontOfSize:fontSize2];
self.position1 = self.subtitle.sort == 2 ? self.subtitle.bottom : self.subtitle2.bottom;
self.position2 = self.subtitle.sort == 2 ? self.subtitle2.bottom : self.subtitle.bottom;
}else{
CGFloat fontSize1 = self.subtitle.size / 2.0;
self.position1 = self.subtitle.bottom;
}
}
-(void)setTextFont
{
CGFloat playerWidth = ScreenWidth;
if (self.style == DWSubtitleStyleDouble) {
CGFloat fontSize1;
CGFloat fontSize2;
if (self.subtitleModel == 1) {
fontSize1 = [DWVideoSubtitleModel getAdaptiveFontSize:self.subtitle.size PlayerWidth:playerWidth] / [UIScreen mainScreen].scale;
fontSize2 = [DWVideoSubtitleModel getAdaptiveFontSize:self.subtitle2.size PlayerWidth:playerWidth] / [UIScreen mainScreen].scale;
}else{
fontSize1 = self.subtitle.size / 2;
fontSize2 = self.subtitle2.size / 2;
}
self.font1 = [UIFont fontWithName:self.fontName size:fontSize1] ? [UIFont fontWithName:self.fontName size:fontSize1] : [UIFont systemFontOfSize:fontSize1];
self.position1 = self.subtitle.bottom;
self.font2 = [UIFont fontWithName:self.fontName size:fontSize2] ? [UIFont fontWithName:self.fontName size:fontSize2] : [UIFont systemFontOfSize:fontSize2];
}else{
CGFloat fontSize1;
if (self.subtitleModel == 1) {
fontSize1 = [DWVideoSubtitleModel getAdaptiveFontSize:self.subtitle.size PlayerWidth:playerWidth] / [UIScreen mainScreen].scale;
}else{
fontSize1 = self.subtitle.size / 2;
}
self.font1 = [UIFont fontWithName:self.fontName size:fontSize1] ? [UIFont fontWithName:self.fontName size:fontSize1] : [UIFont systemFontOfSize:fontSize1];
}
}
......
......@@ -34,7 +34,7 @@
{
NSLog(@"Error setting audio session active: %@", activeError);
}
//后台下载设置
//设置最大下载并发数,默认不设置
// [DWDownloadSessionManager manager].maxDownloadCount = 2;
......
......@@ -25,10 +25,9 @@
{
if (self == [super init]) {
//配置默认值 这里
self.DWAccount_userId = @"391E6E3340A00767";
self.DWAccount_apikey = @"T8WdOUuvFEiOsou1xjDr4U73v12M7iNa";
self.isOpenAd = [[[NSUserDefaults standardUserDefaults] objectForKey:@"isOpenAD"] boolValue];
}
return self;
......
//版本号
#define SDK_VERSION @"4.13.0"
#define SDK_VERSION @"4.14.0"
#import <CCVodSDK/DWGIFManager.h>
#import <CCVodSDK/DWAdInfo.h>
......
......@@ -12,6 +12,8 @@
#import <GLKit/GLKit.h>
#import "DWVRHeader.h"
NS_ASSUME_NONNULL_BEGIN
#pragma mark DW360Director
@interface DW360Director : NSObject<IMDDestroyable>
......@@ -161,5 +163,5 @@
@end
NS_ASSUME_NONNULL_END
......@@ -9,6 +9,8 @@
#import <Foundation/Foundation.h>
#import "DWVRHeader.h"
NS_ASSUME_NONNULL_BEGIN
@interface DW360Program : NSObject<IMDDestroyable>{
GLuint vertexShaderHandle,fragmentShaderHandle;
......@@ -85,3 +87,5 @@
@interface DWYUV420PProgram : DW360Program
@end
NS_ASSUME_NONNULL_END
......@@ -2,6 +2,8 @@
#import <Foundation/Foundation.h>
@class DWVodAdInfoModel;
NS_ASSUME_NONNULL_BEGIN
typedef void (^DWErrorBlock)(NSError *error);
typedef void (^DWAdInfoFinishBlock)(DWVodAdInfoModel * adInfo);
......@@ -32,7 +34,7 @@ typedef void (^DWAdInfoFinishBlock)(DWVodAdInfoModel * adInfo);
* @param type 广告类型
* @result DWAdInfo对象
*/
-(id)initWithUserId:(NSString *)userId andVideoId:(NSString *)videoId type:(NSString *)type;
-(instancetype)initWithUserId:(NSString *)userId andVideoId:(NSString *)videoId type:(NSString *)type;
/*!
* @method
......@@ -42,3 +44,5 @@ typedef void (^DWAdInfoFinishBlock)(DWVodAdInfoModel * adInfo);
-(void)start;
@end
NS_ASSUME_NONNULL_END
......@@ -7,9 +7,10 @@
//
#import <Foundation/Foundation.h>
#import "DWBarrageModel.h"
@class DWBarrageManager;
NS_ASSUME_NONNULL_BEGIN
@protocol DWBarrageManagerDelegate <NSObject>
@optional
......@@ -66,3 +67,5 @@
-(void)cancelRequest;
@end
NS_ASSUME_NONNULL_END
......@@ -8,6 +8,8 @@
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
///弹幕数据模型
@interface DWBarrageModel : NSObject
......@@ -39,3 +41,4 @@
@end
NS_ASSUME_NONNULL_END
......@@ -8,6 +8,7 @@
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
// 下载状态
typedef NS_ENUM(NSUInteger, DWDownloadState) {
......@@ -103,6 +104,11 @@ typedef void (^DWDownloadStateBlock)(DWDownloadModel *downloadModel, NSError *er
*/
@property(nonatomic, assign, readonly)NSInteger defaultSubtitle;
/**
* @brief 字幕模式,-1 无字幕 ,0 固定字号, 1 自适应模式
*/
@property(nonatomic, assign, readonly)NSInteger subtitlemodel;
/**
* @brief 字幕1
*/
......@@ -184,3 +190,5 @@ typedef void (^DWDownloadStateBlock)(DWDownloadModel *downloadModel, NSError *er
@property(nonatomic, assign, readonly)int remainingTime;
@end
NS_ASSUME_NONNULL_END
......@@ -11,6 +11,8 @@
#import <HDBaseUtils/HDURLSessionManager.h>
NS_ASSUME_NONNULL_BEGIN
@class DWVodVideoModel;
// 下载代理
......@@ -88,7 +90,7 @@
* @param othersInfo 自定义字段,可为空
* @result 创建成功返回DWDownloadModel对象,如果失败,返回nil
*/
+(DWDownloadModel *)createDownloadModel:(DWVodVideoModel *)videoMdoel Quality:(NSString *)quality AndOthersInfo:(NSDictionary *)othersInfo;
+(DWDownloadModel *)createDownloadModel:(DWVodVideoModel *)videoMdoel Quality:(NSString *)quality AndOthersInfo:(nullable NSDictionary *)othersInfo;
/*!
* @method
......@@ -220,16 +222,18 @@
* @param totalBytesExpectedToWrite 文件的总大小。对于未完成的任务,必填
* @result 若过渡成功,返回DWDownloadModel对象,否则返回nil
*/
-(DWDownloadModel *)migrateDownloadTask:(NSString *)loaclPath
DownloadUrl:(NSString *)downloadUrl
MediaType:(NSString *)mediaType
Quality:(NSString *)quality
Desp:(NSString *)desp
-(DWDownloadModel *)migrateDownloadTask:(nullable NSString *)loaclPath
DownloadUrl:(nullable NSString *)downloadUrl
MediaType:(nullable NSString *)mediaType
Quality:(nullable NSString *)quality
Desp:(nullable NSString *)desp
VRMode:(BOOL)vrMode
OthersInfo:(NSDictionary *)othersInfo
UserId:(NSString *)userId
VideoId:(NSString *)videoId
OthersInfo:(nullable NSDictionary *)othersInfo
UserId:(nullable NSString *)userId
VideoId:(nullable NSString *)videoId
TotalBytesWritten:(int64_t)totalBytesWritten
TotalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite;
@end
NS_ASSUME_NONNULL_END
......@@ -8,6 +8,8 @@
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
///下载工具类
@interface DWDownloadUtility : NSObject
......@@ -30,3 +32,5 @@
+(NSString *)calculateUnit:(unsigned long long)contentLength;
@end
NS_ASSUME_NONNULL_END
......@@ -9,6 +9,8 @@
#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, GIFQuality) {
GIFQualityLow = 0,
GIFQualityMedium = 1,
......@@ -112,7 +114,7 @@ typedef void(^InterceptBlock)(NSError *error,NSURL *outPutURL);
* @param outPath 输出路径
* @param outputFileType 输出视频格式
* @param videoRange 截取视频的范围
* @param completeBlock 视频截取的回调
* @param intercept 视频截取的回调
*/
-(void)interceptVideoAndVideoUrl:(NSURL *)videoUrl withOutPath:(NSString *)outPath outputFileType:(NSString *)outputFileType range:(NSRange)videoRange intercept:(InterceptBlock)interceptBlock __attribute__((deprecated("3.3.0 版本已过期")));
......@@ -152,3 +154,4 @@ typedef void(^InterceptBlock)(NSError *error,NSURL *outPutURL);
@end
NS_ASSUME_NONNULL_END
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface DWLog : NSObject
/*!
......@@ -19,3 +21,5 @@
+(BOOL)isDebugHttpLog;
@end
NS_ASSUME_NONNULL_END
#import <Foundation/Foundation.h>
@class DWVodVideoModel;
NS_ASSUME_NONNULL_BEGIN
typedef void (^DWErrorBlock)(NSError *error);
typedef void (^DWPlayInfoFinishBlock)(DWVodVideoModel * vodVideo);
......@@ -44,7 +46,7 @@ typedef void (^DWPlayInfoFinishBlock)(DWVodVideoModel * vodVideo);
* @param key 账号key
* @result DWPlayInfo对象
*/
-(id)initWithUserId:(NSString *)userId andVideoId:(NSString *)videoId key:(NSString *)key;
-(instancetype)initWithUserId:(NSString *)userId andVideoId:(NSString *)videoId key:(NSString *)key;
/*!
* @method
......@@ -56,7 +58,7 @@ typedef void (^DWPlayInfoFinishBlock)(DWVodVideoModel * vodVideo);
* @param hlsSupport 获取播放地址时,若账号支持hls,填@"1"会返回m3u8下载地址。获取下载地址时,请填@"0"
* @result 操作结果
*/
-(id)initWithUserId:(NSString *)userId andVideoId:(NSString *)videoId key:(NSString *)key hlsSupport:(NSString *)hlsSupport;
-(instancetype)initWithUserId:(NSString *)userId andVideoId:(NSString *)videoId key:(NSString *)key hlsSupport:(NSString *)hlsSupport;
/*!
* @method
......@@ -69,8 +71,9 @@ typedef void (^DWPlayInfoFinishBlock)(DWVodVideoModel * vodVideo);
* @method
* @abstract 取消获取视频数据
* @discussion 取消之后,不会调用errorBlock或finishBlock
* @param time 当前播放时间
*/
-(void)cancel;
@end
NS_ASSUME_NONNULL_END
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment