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
fe6527d3
Commit
fe6527d3
authored
Sep 24, 2020
by
Hanruisong
Browse files
更新到 4.9.0
1.解决SDK在Xcode12上运行编译报错的问题。 2.优化广告功能,支持片尾广告。 3.修复demo中的bug。
parent
24e22896
Changes
75
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
669 additions
and
351 deletions
+669
-351
.DS_Store
.DS_Store
+0
-0
Demo/Demo.xcodeproj/project.pbxproj
Demo/Demo.xcodeproj/project.pbxproj
+55
-22
Demo/Demo.xcodeproj/project.xcworkspace/xcuserdata/appa.xcuserdatad/UserInterfaceState.xcuserstate
...cuserdata/appa.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Demo/Demo.xcodeproj/xcuserdata/appa.xcuserdatad/xcschemes/xcschememanagement.plist
...rdata/appa.xcuserdatad/xcschemes/xcschememanagement.plist
+14
-0
Demo/Demo/Classes/DWMainViewController.m
Demo/Demo/Classes/DWMainViewController.m
+1
-1
Demo/Demo/Classes/DWMemberViewController.m
Demo/Demo/Classes/DWMemberViewController.m
+1
-115
Demo/Demo/Classes/DWVodPlayViewController.m
Demo/Demo/Classes/DWVodPlayViewController.m
+89
-30
Demo/Demo/Classes/View/Ad/DWAdShouView.h
Demo/Demo/Classes/View/Ad/DWAdShouView.h
+3
-0
Demo/Demo/Classes/View/Ad/DWAdShouView.m
Demo/Demo/Classes/View/Ad/DWAdShouView.m
+423
-169
Demo/Demo/Classes/View/Player/DWVodPlayerView.h
Demo/Demo/Classes/View/Player/DWVodPlayerView.h
+8
-0
Demo/Demo/Classes/View/Player/DWVodPlayerView.m
Demo/Demo/Classes/View/Player/DWVodPlayerView.m
+43
-10
Demo/Demo/DWConfigurationManager.m
Demo/Demo/DWConfigurationManager.m
+3
-2
Demo/Demo/Demo-Info.plist
Demo/Demo/Demo-Info.plist
+2
-2
Demo/Demo/Images/icon_ad_mute@2x.png
Demo/Demo/Images/icon_ad_mute@2x.png
+0
-0
Demo/Demo/Images/icon_ad_mute@3x.png
Demo/Demo/Images/icon_ad_mute@3x.png
+0
-0
Demo/Demo/Images/icon_ad_mute_select@2x.png
Demo/Demo/Images/icon_ad_mute_select@2x.png
+0
-0
Demo/Demo/Images/icon_ad_mute_select@3x.png
Demo/Demo/Images/icon_ad_mute_select@3x.png
+0
-0
Demo/Demo/Plugins/Tools/DWTools.h
Demo/Demo/Plugins/Tools/DWTools.h
+3
-0
Demo/Demo/Plugins/Tools/DWTools.m
Demo/Demo/Plugins/Tools/DWTools.m
+24
-0
Demo/Demo/SDK/CCVodSDK.framework/CCVodSDK
Demo/Demo/SDK/CCVodSDK.framework/CCVodSDK
+0
-0
No files found.
.DS_Store
View file @
fe6527d3
No preview for this file type
Demo/Demo.xcodeproj/project.pbxproj
View file @
fe6527d3
...
...
@@ -107,8 +107,6 @@
043D4E6B22D5C91D00FCDCBE
/* icon_sound_add@2x.png in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
043D4E6522D5C91D00FCDCBE
/* icon_sound_add@2x.png */
;
};
043D4E6C22D5C91D00FCDCBE
/* icon_sound_sub@3x.png in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
043D4E6622D5C91D00FCDCBE
/* icon_sound_sub@3x.png */
;
};
04665AC22296494700918348
/* DWVisitorCollectView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04665AC12296494700918348
/* DWVisitorCollectView.m */
;
};
04764E3624E50D900016DE9A
/* CCVodSDK.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04764E3524E50D900016DE9A
/* CCVodSDK.framework */
;
};
04764E3824E50D900016DE9A
/* HDBaseUtils.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04764E3724E50D900016DE9A
/* HDBaseUtils.framework */
;
};
047CE82622B8DBD500D87AAF
/* DWExercisesView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
047CE82022B8DBD400D87AAF
/* DWExercisesView.m */
;
};
047CE82722B8DBD500D87AAF
/* DWExercisesFinishView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
047CE82122B8DBD400D87AAF
/* DWExercisesFinishView.m */
;
};
047CE82822B8DBD500D87AAF
/* DWExercisesAlertView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
047CE82222B8DBD400D87AAF
/* DWExercisesAlertView.m */
;
};
...
...
@@ -403,8 +401,13 @@
B57CC7BE18E2E575001A1696
/* CoreLocation.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
B57CC7BD18E2E575001A1696
/* CoreLocation.framework */
;
};
B57CC7C018E2E581001A1696
/* AVFoundation.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
B57CC7BF18E2E581001A1696
/* AVFoundation.framework */
;
};
B88562A41DED1AC8008D1763
/* SystemConfiguration.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
B88562A31DED1AC8008D1763
/* SystemConfiguration.framework */
;
};
DD7345AD24F36C8700866368
/* CCVodSDK.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DD7345AB24F36C8700866368
/* CCVodSDK.framework */
;
};
DD7345AE24F36C8700866368
/* HDBaseUtils.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DD7345AC24F36C8700866368
/* HDBaseUtils.framework */
;
};
DD3C6C74251C378500AE4039
/* CCVodSDK.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DD3C6C72251C378500AE4039
/* CCVodSDK.framework */
;
};
DD3C6C76251C382800AE4039
/* HDBaseUtils.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DD3C6C73251C378500AE4039
/* HDBaseUtils.framework */
;
};
DD3C6C77251C382800AE4039
/* HDBaseUtils.framework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DD3C6C73251C378500AE4039
/* 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 */
;
};
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
...
...
@@ -414,6 +417,7 @@
dstPath
=
""
;
dstSubfolderSpec
=
10
;
files
=
(
DD3C6C77251C382800AE4039
/* HDBaseUtils.framework in Embed Frameworks */
,
);
name
=
"Embed Frameworks"
;
runOnlyForDeploymentPostprocessing
=
0
;
...
...
@@ -593,8 +597,6 @@
044C66A122D46DAE0032396F
/* Demo.entitlements */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.plist.entitlements
;
path
=
Demo.entitlements
;
sourceTree
=
"<group>"
;
};
04665AC02296494700918348
/* DWVisitorCollectView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
DWVisitorCollectView.h
;
sourceTree
=
"<group>"
;
};
04665AC12296494700918348
/* DWVisitorCollectView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
DWVisitorCollectView.m
;
sourceTree
=
"<group>"
;
};
04764E3524E50D900016DE9A
/* CCVodSDK.framework */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.framework
;
path
=
CCVodSDK.framework
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
04764E3724E50D900016DE9A
/* HDBaseUtils.framework */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.framework
;
path
=
HDBaseUtils.framework
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
047CE81E22B8DBD400D87AAF
/* DWExercisesAlertView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
DWExercisesAlertView.h
;
sourceTree
=
"<group>"
;
};
047CE81F22B8DBD400D87AAF
/* DWExercisesQuestionView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
DWExercisesQuestionView.h
;
sourceTree
=
"<group>"
;
};
047CE82022B8DBD400D87AAF
/* DWExercisesView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
DWExercisesView.m
;
sourceTree
=
"<group>"
;
};
...
...
@@ -979,8 +981,12 @@
B57CC7BD18E2E575001A1696
/* CoreLocation.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
CoreLocation.framework
;
path
=
System/Library/Frameworks/CoreLocation.framework
;
sourceTree
=
SDKROOT
;
};
B57CC7BF18E2E581001A1696
/* AVFoundation.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
AVFoundation.framework
;
path
=
System/Library/Frameworks/AVFoundation.framework
;
sourceTree
=
SDKROOT
;
};
B88562A31DED1AC8008D1763
/* SystemConfiguration.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
SystemConfiguration.framework
;
path
=
System/Library/Frameworks/SystemConfiguration.framework
;
sourceTree
=
SDKROOT
;
};
DD7345AB24F36C8700866368
/* CCVodSDK.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
path
=
CCVodSDK.framework
;
sourceTree
=
"<group>"
;
};
DD7345AC24F36C8700866368
/* HDBaseUtils.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
path
=
HDBaseUtils.framework
;
sourceTree
=
"<group>"
;
};
DD3C6C72251C378500AE4039
/* CCVodSDK.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
path
=
CCVodSDK.framework
;
sourceTree
=
"<group>"
;
};
DD3C6C73251C378500AE4039
/* HDBaseUtils.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
path
=
HDBaseUtils.framework
;
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>"
;
};
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
...
...
@@ -988,17 +994,15 @@
isa
=
PBXFrameworksBuildPhase
;
buildActionMask
=
2147483647
;
files
=
(
04764E3624E50D900016DE9A
/* CCVodSDK.framework in Frameworks */
,
04764E3824E50D900016DE9A
/* HDBaseUtils.framework in Frameworks */
,
DD3C6C76251C382800AE4039
/* HDBaseUtils.framework in Frameworks */
,
048AD12822CDCE83008C8911
/* libxml2.tbd in Frameworks */
,
043441FF225EF2BB003F7EC1
/* CoreServices.framework in Frameworks */
,
352CBDD91FD6980C00D24715
/* AudioToolbox.framework in Frameworks */
,
352CBDD71FD697E800D24715
/* MediaPlayer.framework in Frameworks */
,
DD7345AE24F36C8700866368
/* HDBaseUtils.framework in Frameworks */
,
B88562A41DED1AC8008D1763
/* SystemConfiguration.framework in Frameworks */
,
B57CC7C018E2E581001A1696
/* AVFoundation.framework in Frameworks */
,
B57CC7BE18E2E575001A1696
/* CoreLocation.framework in Frameworks */
,
DD
7345AD24F36C8700866368
/* CCVodSDK.framework in Frameworks */
,
DD
3C6C74251C378500AE4039
/* CCVodSDK.framework in Frameworks */
,
B57CC7BC18E2E569001A1696
/* CoreMedia.framework in Frameworks */
,
B547EC4C18E033FB00BC980C
/* CoreGraphics.framework in Frameworks */
,
B547EC4E18E033FB00BC980C
/* UIKit.framework in Frameworks */
,
...
...
@@ -1431,6 +1435,10 @@
049FEF82225EEEA200D944C5
/* Images */
=
{
isa
=
PBXGroup
;
children
=
(
DD542806250B55AA0097614C
/* icon_ad_mute_select@2x.png */
,
DD542809250B55AB0097614C
/* icon_ad_mute_select@3x.png */
,
DD542808250B55AB0097614C
/* icon_ad_mute@2x.png */
,
DD542807250B55AB0097614C
/* icon_ad_mute@3x.png */
,
04B0CBE224EA66BC004222DC
/* icon_setting_inpact_normal@2x.png */
,
04B0CBE124EA66BC004222DC
/* icon_setting_inpact_normal@3x.png */
,
04B0CBE024EA66BB004222DC
/* icon_setting_inpact_select@2x.png */
,
...
...
@@ -1806,8 +1814,6 @@
B547EC4818E033FB00BC980C
/* Frameworks */
=
{
isa
=
PBXGroup
;
children
=
(
04764E3524E50D900016DE9A
/* CCVodSDK.framework */
,
04764E3724E50D900016DE9A
/* HDBaseUtils.framework */
,
048AD12722CDCE83008C8911
/* libxml2.tbd */
,
043441FE225EF2BB003F7EC1
/* CoreServices.framework */
,
352CBDD81FD697FA00D24715
/* AudioToolbox.framework */
,
...
...
@@ -1827,7 +1833,7 @@
isa
=
PBXGroup
;
children
=
(
044C66A122D46DAE0032396F
/* Demo.entitlements */
,
DD
7345AA24F36C8700866368
/* SDK */
,
DD
3C6C71251C378500AE4039
/* SDK */
,
0434420D225F0EDD003F7EC1
/* Classes */
,
B547EC5818E033FB00BC980C
/* DWAppDelegate.h */
,
B547EC5918E033FB00BC980C
/* DWAppDelegate.m */
,
...
...
@@ -1854,11 +1860,11 @@
name
=
"Supporting Files"
;
sourceTree
=
"<group>"
;
};
DD
7345AA24F36C8700866368
/* SDK */
=
{
DD
3C6C71251C378500AE4039
/* SDK */
=
{
isa
=
PBXGroup
;
children
=
(
DD
7345AB24F36C8700866368
/* CCVodSDK.framework */
,
DD
7345AC24F36C8700866368
/* HDBaseUtils.framework */
,
DD
3C6C72251C378500AE4039
/* CCVodSDK.framework */
,
DD
3C6C73251C378500AE4039
/* HDBaseUtils.framework */
,
);
path
=
SDK
;
sourceTree
=
"<group>"
;
...
...
@@ -1874,6 +1880,7 @@
B547EC4318E033FB00BC980C
/* Frameworks */
,
B547EC4418E033FB00BC980C
/* Resources */
,
046FF38A2468F48100AB4A98
/* Embed Frameworks */
,
DD3C6BC72519D90000AE4039
/* ShellScript */
,
);
buildRules
=
(
);
...
...
@@ -1947,6 +1954,7 @@
04AB4A2422B1F22A00BB9BF9
/* icon_exercises_answer_b_select@2x.png in Resources */
,
04FFA9FA22647C84008C2713
/* icon_play_gif_disable@3x.png in Resources */
,
04B7A667226B0EF000951983
/* icon_question_wrong@3x.png in Resources */
,
DD54280B250B55AB0097614C
/* icon_ad_mute@3x.png in Resources */
,
0491DCFD24B5604300DF40C7
/* icon_barrage_color_white_normal@3x.png in Resources */
,
04FFA9E222647579008C2713
/* icon_play_full@3x.png in Resources */
,
04DF5D4B2265D6540060B43B
/* icon_radio_bg@3x.png in Resources */
,
...
...
@@ -1976,6 +1984,7 @@
04FFA9E022647579008C2713
/* icon_play_radio@3x.png in Resources */
,
04EB65DC226D9B6200FAB532
/* icon_setting_light_low@2x.png in Resources */
,
04EB65DB226D9B6200FAB532
/* icon_setting_light_high@2x.png in Resources */
,
DD54280D250B55AB0097614C
/* icon_ad_mute_select@3x.png in Resources */
,
04344223225F133C003F7EC1
/* icon_upload@3x.png in Resources */
,
04AB4A3E22B1F22A00BB9BF9
/* icon_exercises_answer_d_select@3x.png in Resources */
,
0491DCEB24B5604300DF40C7
/* icon_barrage_color_07@3x.png in Resources */
,
...
...
@@ -1999,6 +2008,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 */
,
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 */
,
0491DD1224B5604300DF40C7
/* icon_barrage_color_06_select@2x.png in Resources */
,
...
...
@@ -2094,6 +2104,7 @@
04FFA9F422647C84008C2713
/* icon_play_gif_disable@2x.png in Resources */
,
04B0CBE524EA66BC004222DC
/* icon_setting_inpact_normal@3x.png in Resources */
,
04AB4A3C22B1F22A00BB9BF9
/* icon_exercises_answer_h_select@3x.png in Resources */
,
DD54280A250B55AB0097614C
/* icon_ad_mute_select@2x.png in Resources */
,
04DBAC63228A6C8F000EE850
/* icon_placeholder@2x.png in Resources */
,
04CD12022292AF26000C6F0C
/* icon_player_func_top_bg@2x.png in Resources */
,
0491DD2324B5604300DF40C7
/* icon_barrage_color_01@3x.png in Resources */
,
...
...
@@ -2172,6 +2183,26 @@
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
DD3C6BC72519D90000AE4039
/* ShellScript */
=
{
isa
=
PBXShellScriptBuildPhase
;
buildActionMask
=
2147483647
;
files
=
(
);
inputFileListPaths
=
(
);
inputPaths
=
(
);
outputFileListPaths
=
(
);
outputPaths
=
(
);
runOnlyForDeploymentPostprocessing
=
0
;
shellPath
=
/bin/sh
;
shellScript
=
"# Type a script or drag a script file from your workspace to insert its path.\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"
;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
B547EC4218E033FB00BC980C
/* Sources */
=
{
isa
=
PBXSourcesBuildPhase
;
...
...
@@ -2374,7 +2405,7 @@
GCC_WARN_UNINITIALIZED_AUTOS
=
YES
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
IPHONEOS_DEPLOYMENT_TARGET
=
8
.0
;
IPHONEOS_DEPLOYMENT_TARGET
=
9
.0
;
ONLY_ACTIVE_ARCH
=
YES
;
OTHER_LDFLAGS
=
"-all_load"
;
SDKROOT
=
iphoneos
;
...
...
@@ -2408,7 +2439,7 @@
GCC_WARN_UNINITIALIZED_AUTOS
=
YES
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
IPHONEOS_DEPLOYMENT_TARGET
=
8
.0
;
IPHONEOS_DEPLOYMENT_TARGET
=
9
.0
;
ONLY_ACTIVE_ARCH
=
NO
;
OTHER_LDFLAGS
=
"-all_load"
;
SDKROOT
=
iphoneos
;
...
...
@@ -2429,6 +2460,7 @@
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
CODE_SIGN_STYLE
=
Manual
;
CURRENT_PROJECT_VERSION
=
1.0
;
DEVELOPMENT_TEAM
=
39TBB43S2R
;
ENABLE_BITCODE
=
YES
;
ENABLE_STRICT_OBJC_MSGSEND
=
NO
;
...
...
@@ -2444,7 +2476,7 @@
/usr/include/libxml2
,
);
INFOPLIST_FILE
=
"Demo/Demo-Info.plist"
;
IPHONEOS_DEPLOYMENT_TARGET
=
8
.0
;
IPHONEOS_DEPLOYMENT_TARGET
=
9
.0
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
LIBRARY_SEARCH_PATHS
=
(
"$(SRCROOT)/../"
,
...
...
@@ -2476,6 +2508,7 @@
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
CODE_SIGN_STYLE
=
Manual
;
CURRENT_PROJECT_VERSION
=
1.0
;
DEVELOPMENT_TEAM
=
39TBB43S2R
;
ENABLE_BITCODE
=
YES
;
ENABLE_STRICT_OBJC_MSGSEND
=
NO
;
...
...
@@ -2491,7 +2524,7 @@
/usr/include/libxml2
,
);
INFOPLIST_FILE
=
"Demo/Demo-Info.plist"
;
IPHONEOS_DEPLOYMENT_TARGET
=
8
.0
;
IPHONEOS_DEPLOYMENT_TARGET
=
9
.0
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
LIBRARY_SEARCH_PATHS
=
(
"$(SRCROOT)/../"
,
...
...
Demo/Demo.xcodeproj/project.xcworkspace/xcuserdata/appa.xcuserdatad/UserInterfaceState.xcuserstate
View file @
fe6527d3
No preview for this file type
Demo/Demo.xcodeproj/xcuserdata/appa.xcuserdatad/xcschemes/xcschememanagement.plist
0 → 100644
View file @
fe6527d3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist
version=
"1.0"
>
<dict>
<key>
SchemeUserState
</key>
<dict>
<key>
Demo.xcscheme_^#shared#^_
</key>
<dict>
<key>
orderHint
</key>
<integer>
2
</integer>
</dict>
</dict>
</dict>
</plist>
Demo/Demo/Classes/DWMainViewController.m
View file @
fe6527d3
...
...
@@ -94,7 +94,7 @@
-
(
void
)
reloadLoaclData
{
//请自行替换数据
NSArray
*
videos
=
@[
@""
];
NSArray
*
videos
=
@[
@""
];
for
(
int
i
=
0
;
i
<
videos
.
count
;
i
++
)
{
DWVodModel
*
vodModel
=
[[
DWVodModel
alloc
]
init
];
...
...
Demo/Demo/Classes/DWMemberViewController.m
View file @
fe6527d3
...
...
@@ -44,38 +44,6 @@
[
self
.
view
endEditing
:
YES
];
}
/*
-(void)playModelButtonAction:(DWMemberGeneralButton *)button
{
// 100 + i
NSInteger frontIndex = [self.configurationManager.mediaType integerValue];
if (button.tag - 100 == frontIndex) {
return;
}
button.selected = !button.selected;
DWMemberGeneralButton * frontButton = (DWMemberGeneralButton *)[_bgScrollView viewWithTag:frontIndex + 100];
frontButton.selected = NO;
self.configurationManager.mediaType = [NSString stringWithFormat:@"%ld",button.tag - 100];
}
-(void)downloadModelButtonAction:(DWMemberGeneralButton *)button
{
// 200 + i
NSInteger frontIndex = [self.configurationManager.downloadMediaType integerValue] - 1;
if (button.tag - 200 == frontIndex) {
return;
}
button.selected = !button.selected;
DWMemberGeneralButton * frontButton = (DWMemberGeneralButton *)[_bgScrollView viewWithTag:frontIndex + 200];
frontButton.selected = NO;
self.configurationManager.downloadMediaType = [NSString stringWithFormat:@"%ld",button.tag - 200 + 1];
}
*/
-
(
void
)
adModelButtonAction
:(
DWMemberGeneralButton
*
)
button
{
// 300 + i
...
...
@@ -92,6 +60,7 @@
DWMemberGeneralButton
*
frontButton
=
(
DWMemberGeneralButton
*
)[
_bgScrollView
viewWithTag
:
frontIndex
];
frontButton
.
selected
=
NO
;
self
.
configurationManager
.
isOpenAd
=
!
self
.
configurationManager
.
isOpenAd
;
[[
NSUserDefaults
standardUserDefaults
]
setObject
:[
NSNumber
numberWithBool
:
self
.
configurationManager
.
isOpenAd
]
forKey
:
@"isOpenAD"
];
}
-
(
void
)
textFieldDidChangeAction
...
...
@@ -223,89 +192,6 @@
}];
CGFloat
generalButtonWidth
=
(
ScreenWidth
-
10
*
3
-
20
*
2
)
/
3
.
0
;
/*
//播放模式
self.playBgView = [[UIView alloc]init];
[self.bgScrollView addSubview:self.playBgView];
[_playBgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(_veriBgView.mas_bottom).offset(35);
make.left.and.right.equalTo(self.view);
make.height.equalTo(@(14 + 15 + 30));
}];
UILabel * playTsLabel = [[UILabel alloc]init];
playTsLabel.text = @"播放模式";
playTsLabel.font = TitleFont(14);
playTsLabel.textColor = TitleColor_102;
playTsLabel.textAlignment = NSTextAlignmentLeft;
[self.playBgView addSubview:playTsLabel];
[playTsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(@10);
make.right.equalTo(@(-10));
make.top.equalTo(@0);
make.height.equalTo(@14);
}];
titles = @[@"视频+音频",@"视频",@"音频"];
for (int i = 0; i < titles.count; i++) {
DWMemberGeneralButton * button = [[DWMemberGeneralButton alloc]initWithTitle:[titles objectAtIndex:i]];
button.tag = 100 + i;
[button addTarget:self action:@selector(playModelButtonAction:) forControlEvents:UIControlEventTouchUpInside];
[self.playBgView addSubview:button];
[button mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(@(10 + (generalButtonWidth + 20) * i));
make.top.equalTo(playTsLabel.mas_bottom).offset(15);
make.height.equalTo(@30);
make.width.equalTo(@(generalButtonWidth));
}];
if ([self.configurationManager.mediaType intValue] == i) {
button.selected = YES;
}
}
*/
//下载模式
/*
self.downloadBgView = [[UIView alloc]init];
[self.bgScrollView addSubview:self.downloadBgView];
[_downloadBgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(_playBgView.mas_bottom).offset(35);
make.left.and.right.equalTo(self.view);
make.height.equalTo(@(14 + 15 + 30));
}];
UILabel * downloadTsLabel = [[UILabel alloc]init];
downloadTsLabel.text = @"下载模式";
downloadTsLabel.font = TitleFont(14);
downloadTsLabel.textColor = TitleColor_102;
downloadTsLabel.textAlignment = NSTextAlignmentLeft;
[self.downloadBgView addSubview:downloadTsLabel];
[downloadTsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(@10);
make.right.equalTo(@(-10));
make.top.equalTo(@0);
make.height.equalTo(@14);
}];
titles = @[@"视频",@"音频"];
for (int i = 0; i < titles.count; i++) {
DWMemberGeneralButton * button = [[DWMemberGeneralButton alloc]initWithTitle:[titles objectAtIndex:i]];
button.tag = 200 + i;
[button addTarget:self action:@selector(downloadModelButtonAction:) forControlEvents:UIControlEventTouchUpInside];
[self.downloadBgView addSubview:button];
[button mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(@(10 + (generalButtonWidth + 20) * i));
make.top.equalTo(downloadTsLabel.mas_bottom).offset(15);
make.height.equalTo(@30);
make.width.equalTo(@(generalButtonWidth));
}];
if ([self.configurationManager.downloadMediaType intValue] == i + 1) {
button.selected = YES;
}
}
*/
//广告功能
self
.
adBgView
=
[[
UIView
alloc
]
init
];
...
...
Demo/Demo/Classes/DWVodPlayViewController.m
View file @
fe6527d3
...
...
@@ -58,7 +58,7 @@ typedef enum : NSUInteger {
DWConfigurationManager
*
manager
=
[
DWConfigurationManager
sharedInstance
];
if
(
manager
.
isOpenAd
)
{
//广告模式
[
self
startRequestAdInfo
:
NO
];
[
self
startRequestAdInfo
:
1
];
}
else
{
//正常播放
[
self
startRequestVideo
:
self
.
vodModel
.
videoId
];
...
...
@@ -90,30 +90,40 @@ typedef enum : NSUInteger {
[
playInfo
start
];
}
-
(
void
)
startRequestAdInfo
:(
BOOL
)
isPauseAd
//1片头广告,2暂停广告,3片尾广告
-
(
void
)
startRequestAdInfo
:(
int
)
type
{
__weak
typeof
(
self
)
weakSelf
=
self
;
if
(
isPauseAd
)
{
//暂停广告
DWAdInfo
*
adInfo
=
[[
DWAdInfo
alloc
]
initWithUserId
:[
DWConfigurationManager
sharedInstance
].
DWAccount_userId
andVideoId
:
self
.
vodModel
.
videoId
type
:
@"2"
];
[
adInfo
start
];
adInfo
.
finishBlock
=
^
(
DWVodAdInfoModel
*
adInfo
)
{
[
weakSelf
.
adShowView
playAdVideo
:
adInfo
];
};
adInfo
.
errorBlock
=
^
(
NSError
*
error
)
{
[
@"暂停广告请求失败"
showAlert
];
};
}
else
{
//片头广告
DWAdInfo
*
adInfo
=
[[
DWAdInfo
alloc
]
initWithUserId
:[
DWConfigurationManager
sharedInstance
].
DWAccount_userId
andVideoId
:
self
.
vodModel
.
videoId
type
:
@"1"
];
[
adInfo
start
];
adInfo
.
finishBlock
=
^
(
DWVodAdInfoModel
*
adInfo
)
{
[
weakSelf
.
adShowView
playAdVideo
:
adInfo
];
};
adInfo
.
errorBlock
=
^
(
NSError
*
error
)
{
[
@"片头广告请求失败"
showAlert
];
};
}
DWAdInfo
*
adInfo
=
[[
DWAdInfo
alloc
]
initWithUserId
:[
DWConfigurationManager
sharedInstance
].
DWAccount_userId
andVideoId
:
self
.
vodModel
.
videoId
type
:
[
NSString
stringWithFormat
:
@"%d"
,
type
]];
[
adInfo
start
];
adInfo
.
finishBlock
=
^
(
DWVodAdInfoModel
*
adInfo
)
{
//若获取完广告信息时,没有显示广告视图,不加载广告
if
(
!
weakSelf
.
adShowView
.
hidden
)
{
weakSelf
.
playerView
.
isShowAd
=
NO
;
return
;
}
[
weakSelf
.
adShowView
playAdVideo
:
adInfo
];
};
adInfo
.
errorBlock
=
^
(
NSError
*
error
)
{
weakSelf
.
playerView
.
isShowAd
=
NO
;
//片尾广告请求失败,继续播放下一集
if
(
type
==
3
)
{
[
weakSelf
.
playerView
playNextVideo
];
return
;
}
if
(
type
==
1
)
{
[
weakSelf
startRequestVideo
:
weakSelf
.
vodModel
.
videoId
];
}
// [@"广告请求失败" showAlert];
// [error.localizedDescription showAlert];
};
self
.
playerView
.
isShowAd
=
YES
;
}
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
...
...
@@ -174,7 +184,7 @@ typedef enum : NSUInteger {
[
_adShowView
mas_remakeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
top
.
and
.
left
.
equalTo
(
@0
);
make
.
width
.
equalTo
(
@
(
self
.
playerViewSize
.
width
));
make
.
height
.
equalTo
(
@
(
self
.
playerViewSize
.
height
));
make
.
height
.
equalTo
(
@
(
self
.
playerViewSize
.
height
-
40
));
}];
if
(
self
.
screenBgView
)
{
...
...
@@ -224,6 +234,8 @@ typedef enum : NSUInteger {
#pragma mark - DWAdShouViewDelegate
-
(
void
)
adShowPlayDidFinish
:(
DWAdShouView
*
)
adShowView
AndAdType
:(
NSInteger
)
type
{
self
.
playerView
.
isShowAd
=
NO
;
if
(
type
==
1
)
{
//片头广告结束,播放正片
[
self
startRequestVideo
:
self
.
vodModel
.
videoId
];
...
...
@@ -233,11 +245,21 @@ typedef enum : NSUInteger {
//暂停广告结束,继续播放
[
self
.
playerView
play
];
}
if
(
type
==
3
)
{
//片尾广告结束,播放下一集
[
self
.
playerView
playNextVideo
];
}
}
-
(
void
)
adShowPlay
:(
DWAdShouView
*
)
adShowView
DidScreenRotate
:(
BOOL
)
isFull
{
if
(
isFull
)
{
[[
UIDevice
currentDevice
]
setValue
:[
NSNumber
numberWithInteger
:
UIDeviceOrientationPortrait
]
forKey
:
@"orientation"
];
}
else
{
[[
UIDevice
currentDevice
]
setValue
:[
NSNumber
numberWithInteger
:
UIDeviceOrientationLandscapeLeft
]
forKey
:
@"orientation"
];
}
}
#pragma mark - DWVodPlayerViewDelegate
...
...
@@ -262,9 +284,12 @@ typedef enum : NSUInteger {
if
(
!
isPlaying
)
{
//播放暂停广告
[
self
startRequestAdInfo
:
YES
];
[
self
startRequestAdInfo
:
2
];
}
else
{
self
.
adShowView
.
hidden
=
YES
;
if
(
!
self
.
adShowView
.
hidden
)
{
[
self
.
adShowView
adFinish
];
}
self
.
playerView
.
isShowAd
=
NO
;
}
}
...
...
@@ -280,9 +305,21 @@ typedef enum : NSUInteger {
//播放下一集事件
-
(
void
)
vodPlayerView
:(
DWVodPlayerView
*
)
playerView
NextSelection
:(
NSInteger
)
nextIndex
{
if
(
!
self
.
adShowView
.
hidden
)
{
[
self
.
adShowView
adFinish
];
}
self
.
playerView
.
isShowAd
=
NO
;
DWVodModel
*
vodModel
=
[
self
.
vidoeList
objectAtIndex
:
nextIndex
];
self
.
vodModel
=
vodModel
;
[
self
startRequestVideo
:
self
.
vodModel
.
videoId
];
DWConfigurationManager
*
manager
=
[
DWConfigurationManager
sharedInstance
];
if
(
manager
.
isOpenAd
)
{
//广告模式
[
self
startRequestAdInfo
:
1
];
}
else
{
//正常播放
[
self
startRequestVideo
:
self
.
vodModel
.
videoId
];
}
[
self
.
listTableView
reloadData
];
}
...
...
@@ -328,6 +365,13 @@ typedef enum : NSUInteger {
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
}
//片尾广告事件
-
(
void
)
vodPlayerViewEndAd
:(
DWVodPlayerView
*
)
playerView
{
// NSLog(@"准备请求片尾广告 %@",self.vodModel.videoId);
[
self
startRequestAdInfo
:
3
];
}
#pragma mark - 投屏相关
-
(
void
)
screeningReturnButtonAction
{
...
...
@@ -400,8 +444,23 @@ typedef enum : NSUInteger {
return
;
}
if
(
!
self
.
adShowView
.
hidden
)
{
[
self
.
adShowView
adFinish
];
}
self
.
playerView
.
isShowAd
=
NO
;
self
.
vodModel
=
vodModel
;
[
self
startRequestVideo
:
self
.
vodModel
.
videoId
];
DWConfigurationManager
*
manager
=
[
DWConfigurationManager
sharedInstance
];
if
(
manager
.
isOpenAd
)
{
//广告模式
[
self
startRequestAdInfo
:
1
];
}
else
{
//正常播放
[
self
startRequestVideo
:
self
.
vodModel
.
videoId
];
}
// self.vodModel = vodModel;
// [self startRequestVideo:self.vodModel.videoId];
[
tableView
reloadData
];
}
...
...
@@ -563,7 +622,7 @@ typedef enum : NSUInteger {
[
_adShowView
mas_makeConstraints
:
^
(
MASConstraintMaker
*