Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CCVideo
VOD_iOS_SDK
Commits
2dc44792
Commit
2dc44792
authored
Mar 17, 2021
by
Hanruisong
Browse files
feat: 更新到4.14.0
1.新增字幕自适应功能。 2.完善SDK编码规范。
parent
cd58867c
Changes
63
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
140 additions
and
62 deletions
+140
-62
Demo/Demo.xcodeproj/project.pbxproj
Demo/Demo.xcodeproj/project.pbxproj
+26
-26
Demo/Demo.xcodeproj/project.xcworkspace/xcuserdata/appa.xcuserdatad/UserInterfaceState.xcuserstate
...cuserdata/appa.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Demo/Demo/Classes/View/Player/DWVodPlayerView.m
Demo/Demo/Classes/View/Player/DWVodPlayerView.m
+11
-2
Demo/Demo/Classes/View/SubTitle/DWSubtitleView.h
Demo/Demo/Classes/View/SubTitle/DWSubtitleView.h
+1
-1
Demo/Demo/Classes/View/SubTitle/DWSubtitleView.m
Demo/Demo/Classes/View/SubTitle/DWSubtitleView.m
+41
-13
Demo/Demo/DWAppDelegate.m
Demo/Demo/DWAppDelegate.m
+1
-1
Demo/Demo/DWConfigurationManager.m
Demo/Demo/DWConfigurationManager.m
+1
-2
Demo/Demo/SDK/CCVodSDK.framework/CCVodSDK
Demo/Demo/SDK/CCVodSDK.framework/CCVodSDK
+0
-0
Demo/Demo/SDK/CCVodSDK.framework/Headers/CCVodSDK.h
Demo/Demo/SDK/CCVodSDK.framework/Headers/CCVodSDK.h
+1
-1
Demo/Demo/SDK/CCVodSDK.framework/Headers/DW360Director.h
Demo/Demo/SDK/CCVodSDK.framework/Headers/DW360Director.h
+3
-1
Demo/Demo/SDK/CCVodSDK.framework/Headers/DW360Program.h
Demo/Demo/SDK/CCVodSDK.framework/Headers/DW360Program.h
+4
-0
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWAdInfo.h
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWAdInfo.h
+5
-1
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWBarrageManager.h
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWBarrageManager.h
+4
-1
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWBarrageModel.h
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWBarrageModel.h
+3
-0
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWDownloadModel.h
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWDownloadModel.h
+8
-0
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWDownloadSessionManager.h
...SDK/CCVodSDK.framework/Headers/DWDownloadSessionManager.h
+13
-9
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWDownloadUtility.h
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWDownloadUtility.h
+4
-0
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWGIFManager.h
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWGIFManager.h
+4
-1
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWLog.h
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWLog.h
+4
-0
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWPlayInfo.h
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWPlayInfo.h
+6
-3
No files found.
Demo/Demo.xcodeproj/project.pbxproj
View file @
2dc44792
...
...
@@ -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 */
;
};
DD
DFFE9A25B6BA
09009
C54EE
/* vrlibraw.bundle in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DD
DFFE9825B6BA
09009
C54EE
/* vrlibraw.bundle */
;
};
DD
DFFE9B25B6BA
09009
C54EE
/* DWResource.bundle in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DD
DFFE9925B6BA
09009
C54EE
/* DWResource.bundle */
;
};
DD
DFFE9C25B6BA13009C54EE
/* HDBaseUtils.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DD
DFFE9525B6BA00009C54EE
/* HDBaseUtils.framework */
;
};
DD
DFFE9D25B6BA13009C54EE
/* HDBaseUtils.framework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DD
DFFE9525B6BA00009C54EE
/* HDBaseUtils.framework */
;
settings
=
{
ATTRIBUTES
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
};
};
DD
DFFE9E25B6BA15009C54EE
/* CCVodSDK.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DD
DFFE9425B6BA00009C54EE
/* CCVodSDK.framework */
;
};
DD
DFFE9F25B6BA15009C54EE
/* CCVodSDK.framework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DD
DFFE9425B6BA00009C54EE
/* CCVodSDK.framework */
;
settings
=
{
ATTRIBUTES
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
};
};
DD
CB151426020
09
3
009
5BBD8
/* vrlibraw.bundle in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DD
CB151226020
09
3
009
5BBD8
/* vrlibraw.bundle */
;
};
DD
CB151526020
09
3
009
5BBD8
/* DWResource.bundle in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DD
CB151326020
09
3
009
5BBD8
/* DWResource.bundle */
;
};
DD
CB15162602009E0095BBD8
/* HDBaseUtils.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DD
CB150F260200860095BBD8
/* HDBaseUtils.framework */
;
};
DD
CB15172602009E0095BBD8
/* HDBaseUtils.framework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DD
CB150F260200860095BBD8
/* HDBaseUtils.framework */
;
settings
=
{
ATTRIBUTES
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
};
};
DD
CB1519260200A00095BBD8
/* CCVodSDK.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DD
CB150E260200860095BBD8
/* CCVodSDK.framework */
;
};
DD
CB151A260200A00095BBD8
/* CCVodSDK.framework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DD
CB150E260200860095BBD8
/* CCVodSDK.framework */
;
settings
=
{
ATTRIBUTES
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
};
};
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
DD
0F24D3255E22B000DA2705
/* Embed Frameworks */
=
{
DD
CB15182602009F0095BBD8
/* Embed Frameworks */
=
{
isa
=
PBXCopyFilesBuildPhase
;
buildActionMask
=
2147483647
;
dstPath
=
""
;
dstSubfolderSpec
=
10
;
files
=
(
DD
DFFE9D25B6BA13009C54EE
/* HDBaseUtils.framework in Embed Frameworks */
,
DD
DFFE9F25B6BA15009C54EE
/* CCVodSDK.framework in Embed Frameworks */
,
DD
CB15172602009E0095BBD8
/* HDBaseUtils.framework in Embed Frameworks */
,
DD
CB151A260200A00095BBD8
/* 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>"
;
};
DD
DFFE9425B6BA00009C54EE
/* CCVodSDK.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
path
=
CCVodSDK.framework
;
sourceTree
=
"<group>"
;
};
DD
DFFE9525B6BA00009C54EE
/* HDBaseUtils.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
path
=
HDBaseUtils.framework
;
sourceTree
=
"<group>"
;
};
DD
DFFE9825B6BA
09009
C54EE
/* vrlibraw.bundle */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"wrapper.plug-in"
;
name
=
vrlibraw.bundle
;
path
=
CCVodSDK.framework/vrlibraw.bundle
;
sourceTree
=
"<group>"
;
};
DD
DFFE9925B6BA
09009
C54EE
/* DWResource.bundle */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"wrapper.plug-in"
;
name
=
DWResource.bundle
;
path
=
CCVodSDK.framework/DWResource.bundle
;
sourceTree
=
"<group>"
;
};
DD
CB150E260200860095BBD8
/* CCVodSDK.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
path
=
CCVodSDK.framework
;
sourceTree
=
"<group>"
;
};
DD
CB150F260200860095BBD8
/* HDBaseUtils.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
path
=
HDBaseUtils.framework
;
sourceTree
=
"<group>"
;
};
DD
CB151226020
09
3
009
5BBD8
/* vrlibraw.bundle */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"wrapper.plug-in"
;
name
=
vrlibraw.bundle
;
path
=
CCVodSDK.framework/vrlibraw.bundle
;
sourceTree
=
"<group>"
;
};
DD
CB151326020
09
3
009
5BBD8
/* 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
=
(
DD
DFFE9C25B6BA13009C54EE
/* HDBaseUtils.framework in Frameworks */
,
DD
CB15162602009E0095BBD8
/* 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 */
,
DD
DFFE9E25B6BA15009C54EE
/* CCVodSDK.framework in Frameworks */
,
DD
CB1519260200A00095BBD8
/* 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 */
,
DD
DFFE9325B6BA00009C54EE
/* SDK */
,
DD
CB150D260200860095BBD8
/* SDK */
,
0434420D225F0EDD003F7EC1
/* Classes */
,
B547EC5818E033FB00BC980C
/* DWAppDelegate.h */
,
B547EC5918E033FB00BC980C
/* DWAppDelegate.m */
,
...
...
@@ -1874,13 +1874,13 @@
name
=
"Supporting Files"
;
sourceTree
=
"<group>"
;
};
DD
DFFE9325B6BA00009C54EE
/* SDK */
=
{
DD
CB150D260200860095BBD8
/* SDK */
=
{
isa
=
PBXGroup
;
children
=
(
DD
DFFE9925B6BA
09009
C54EE
/* DWResource.bundle */
,
DD
DFFE9825B6BA
09009
C54EE
/* vrlibraw.bundle */
,
DD
DFFE9425B6BA00009C54EE
/* CCVodSDK.framework */
,
DD
DFFE9525B6BA00009C54EE
/* HDBaseUtils.framework */
,
DD
CB151326020
09
3
009
5BBD8
/* DWResource.bundle */
,
DD
CB151226020
09
3
009
5BBD8
/* vrlibraw.bundle */
,
DD
CB150E260200860095BBD8
/* CCVodSDK.framework */
,
DD
CB150F260200860095BBD8
/* HDBaseUtils.framework */
,
);
path
=
SDK
;
sourceTree
=
"<group>"
;
...
...
@@ -1895,8 +1895,8 @@
B547EC4218E033FB00BC980C
/* Sources */
,
B547EC4318E033FB00BC980C
/* Frameworks */
,
B547EC4418E033FB00BC980C
/* Resources */
,
DD
0F24D3255E22B000DA2705
/* Embed Frameworks */
,
DD
DFFEA025B6BA2D009C54EE
/* ShellScript */
,
DD
CB15182602009F0095BBD8
/* Embed Frameworks */
,
DD
CB151B260200C00095BBD8
/* 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 */
,
DD
DFFE9A25B6BA
09009
C54EE
/* vrlibraw.bundle in Resources */
,
DD
CB151426020
09
3
009
5BBD8
/* 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 */
,
DD
DFFE9B25B6BA
09009
C54EE
/* DWResource.bundle in Resources */
,
DD
CB151526020
09
3
009
5BBD8
/* 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 */
DD
DFFEA025B6BA2D009C54EE
/* ShellScript */
=
{
DD
CB151B260200C00095BBD8
/* ShellScript */
=
{
isa
=
PBXShellScriptBuildPhase
;
buildActionMask
=
2147483647
;
files
=
(
...
...
Demo/Demo.xcodeproj/project.xcworkspace/xcuserdata/appa.xcuserdatad/UserInterfaceState.xcuserstate
View file @
2dc44792
No preview for this file type
Demo/Demo/Classes/View/Player/DWVodPlayerView.m
View file @
2dc44792
...
...
@@ -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
];
}
...
...
Demo/Demo/Classes/View/SubTitle/DWSubtitleView.h
View file @
2dc44792
...
...
@@ -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
;
...
...
Demo/Demo/Classes/View/SubTitle/DWSubtitleView.m
View file @
2dc44792
...
...
@@ -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
];
}
}
...
...
Demo/Demo/DWAppDelegate.m
View file @
2dc44792
...
...
@@ -34,7 +34,7 @@
{
NSLog
(
@"Error setting audio session active: %@"
,
activeError
);
}
//后台下载设置
//设置最大下载并发数,默认不设置
// [DWDownloadSessionManager manager].maxDownloadCount = 2;
...
...
Demo/Demo/DWConfigurationManager.m
View file @
2dc44792
...
...
@@ -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
;
...
...
Demo/Demo/SDK/CCVodSDK.framework/CCVodSDK
View file @
2dc44792
No preview for this file type
Demo/Demo/SDK/CCVodSDK.framework/Headers/CCVodSDK.h
View file @
2dc44792
//版本号
#define SDK_VERSION @"4.1
3
.0"
#define SDK_VERSION @"4.1
4
.0"
#import <CCVodSDK/DWGIFManager.h>
#import <CCVodSDK/DWAdInfo.h>
...
...
Demo/Demo/SDK/CCVodSDK.framework/Headers/DW360Director.h
View file @
2dc44792
...
...
@@ -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
Demo/Demo/SDK/CCVodSDK.framework/Headers/DW360Program.h
View file @
2dc44792
...
...
@@ -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
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWAdInfo.h
View file @
2dc44792
...
...
@@ -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对象
*/
-
(
i
d
)
initWithUserId
:(
NSString
*
)
userId
andVideoId
:(
NSString
*
)
videoId
type
:(
NSString
*
)
type
;
-
(
i
nstancetype
)
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
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWBarrageManager.h
View file @
2dc44792
...
...
@@ -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
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWBarrageModel.h
View file @
2dc44792
...
...
@@ -8,6 +8,8 @@
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
///弹幕数据模型
@interface
DWBarrageModel
:
NSObject
...
...
@@ -39,3 +41,4 @@
@end
NS_ASSUME_NONNULL_END
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWDownloadModel.h
View file @
2dc44792
...
...
@@ -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
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWDownloadSessionManager.h
View file @
2dc44792
...
...
@@ -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
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWDownloadUtility.h
View file @
2dc44792
...
...
@@ -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
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWGIFManager.h
View file @
2dc44792
...
...
@@ -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
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWLog.h
View file @
2dc44792
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface
DWLog
:
NSObject
/*!
...
...
@@ -19,3 +21,5 @@
+
(
BOOL
)
isDebugHttpLog
;
@end
NS_ASSUME_NONNULL_END
Demo/Demo/SDK/CCVodSDK.framework/Headers/DWPlayInfo.h
View file @
2dc44792
#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对象
*/
-
(
i
d
)
initWithUserId
:(
NSString
*
)
userId
andVideoId
:(
NSString
*
)
videoId
key
:(
NSString
*
)
key
;
-
(
i
nstancetype
)
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 操作结果
*/
-
(
i
d
)
initWithUserId
:(
NSString
*
)
userId
andVideoId
:(
NSString
*
)
videoId
key
:(
NSString
*
)
key
hlsSupport
:(
NSString
*
)
hlsSupport
;
-
(
i
nstancetype
)
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
Prev
1
2
3
4
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment