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
98ebf965
Commit
98ebf965
authored
Mar 24, 2020
by
Han Ruisong
Browse files
升级到 4.4.2
1.播放页面新增手势调节功能。
parent
a793c64c
Changes
20
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
803 additions
and
90 deletions
+803
-90
.DS_Store
.DS_Store
+0
-0
Demo/Demo.xcodeproj/project.pbxproj
Demo/Demo.xcodeproj/project.pbxproj
+104
-82
Demo/Demo.xcodeproj/project.xcworkspace/xcuserdata/mac.xcuserdatad/UserInterfaceState.xcuserstate
...xcuserdata/mac.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Demo/Demo.xcodeproj/xcuserdata/mac.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
...data/mac.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+42
-0
Demo/Demo/Classes/DWUploadInfoSetupViewController.m
Demo/Demo/Classes/DWUploadInfoSetupViewController.m
+1
-4
Demo/Demo/Classes/View/Player/BrightnessView.h
Demo/Demo/Classes/View/Player/BrightnessView.h
+16
-0
Demo/Demo/Classes/View/Player/BrightnessView.m
Demo/Demo/Classes/View/Player/BrightnessView.m
+224
-0
Demo/Demo/Classes/View/Player/DWPlayerTimeSilder.h
Demo/Demo/Classes/View/Player/DWPlayerTimeSilder.h
+17
-0
Demo/Demo/Classes/View/Player/DWPlayerTimeSilder.m
Demo/Demo/Classes/View/Player/DWPlayerTimeSilder.m
+96
-0
Demo/Demo/Classes/View/Player/DWVodPlayerPanGesture.h
Demo/Demo/Classes/View/Player/DWVodPlayerPanGesture.h
+39
-0
Demo/Demo/Classes/View/Player/DWVodPlayerPanGesture.m
Demo/Demo/Classes/View/Player/DWVodPlayerPanGesture.m
+229
-0
Demo/Demo/Classes/View/Player/DWVodPlayerView.m
Demo/Demo/Classes/View/Player/DWVodPlayerView.m
+33
-1
Demo/Demo/DWConfigurationManager.m
Demo/Demo/DWConfigurationManager.m
+0
-1
Demo/Demo/Images/brightness.png
Demo/Demo/Images/brightness.png
+0
-0
Demo/Demo/SDK/DWSDK.h
Demo/Demo/SDK/DWSDK.h
+1
-1
Demo/Demo/SDK/libCCSDK.a
Demo/Demo/SDK/libCCSDK.a
+0
-0
doc/iOS点播SDK开发指南/4.开发指南.html
doc/iOS点播SDK开发指南/4.开发指南.html
+0
-0
doc/iOS点播SDK开发指南/5.更新日志.html
doc/iOS点播SDK开发指南/5.更新日志.html
+0
-0
include/DWSDK.h
include/DWSDK.h
+1
-1
include/libCCSDK.a
include/libCCSDK.a
+0
-0
No files found.
.DS_Store
View file @
98ebf965
No preview for this file type
Demo/Demo.xcodeproj/project.pbxproj
View file @
98ebf965
This diff is collapsed.
Click to expand it.
Demo/Demo.xcodeproj/project.xcworkspace/xcuserdata/mac.xcuserdatad/UserInterfaceState.xcuserstate
View file @
98ebf965
No preview for this file type
Demo/Demo.xcodeproj/xcuserdata/mac.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
View file @
98ebf965
...
...
@@ -3,4 +3,46 @@
uuid =
"D493E4A5-FF32-4C5D-B61B-0D88D4BD1AD4"
type =
"1"
version =
"2.0"
>
<<<<<<<
.working
<<<<<<<
.working
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"DE53A975-9630-4280-B01B-8814706A834B"
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Demo/Classes/View/Player/DWVodPlayerPanGesture.m"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"67"
endingLineNumber =
"67"
landmarkName =
"-handlePan"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
=======
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
uuid =
"AFBDA185-F80C-4FB7-9C05-D31B5996C717"
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"Demo/Plugins/HDMarqueeView.m"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"118"
endingLineNumber =
"118"
landmarkName =
"-stopMarquee"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
=======
>>>>>>> .merge-right.r2371
>>>>>>> .merge-right.r2366
</Bucket>
Demo/Demo/Classes/DWUploadInfoSetupViewController.m
View file @
98ebf965
...
...
@@ -244,10 +244,7 @@
}
}
}
// if (CGRectGetMaxY(lastView.frame) > self.bgScrollView.frame.size.height) {
// self.bgScrollView.contentSize = CGSizeMake(self.view.frame.size.width, CGRectGetMaxY(lastView.frame));
// }
}
@end
Demo/Demo/Classes/View/Player/BrightnessView.h
0 → 100755
View file @
98ebf965
//
// Created by zlcode on 2017/4/19.
// Copyright © 2017年 zlcode. All rights reserved.
//
#import <UIKit/UIKit.h>
#define ZLScreenWidth [UIScreen mainScreen].bounds.size.width
#define ZLScreenHeight [UIScreen mainScreen].bounds.size.height
#define ZLSystemVersion ([[[UIDevice currentDevice] systemVersion] floatValue])
@interface
BrightnessView
:
UIView
+
(
instancetype
)
sharedBrightnessView
;
@end
Demo/Demo/Classes/View/Player/BrightnessView.m
0 → 100755
View file @
98ebf965
//
// Created by zlcode on 2017/4/19.
// Copyright © 2017年 zlcode. All rights reserved.
//
#import "BrightnessView.h"
@interface
BrightnessView
()
@property
(
nonatomic
,
strong
)
UIImageView
*
backImage
;
@property
(
nonatomic
,
strong
)
UILabel
*
title
;
@property
(
nonatomic
,
strong
)
UIView
*
brightnessLevelView
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
tipArray
;
@property
(
nonatomic
,
strong
)
NSTimer
*
timer
;
@end
@implementation
BrightnessView
#pragma mark - 懒加载
-
(
UILabel
*
)
title
{
if
(
!
_title
)
{
_title
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
5
,
self
.
bounds
.
size
.
width
,
30
)];
_title
.
font
=
[
UIFont
boldSystemFontOfSize
:
16
];
_title
.
textColor
=
[
UIColor
colorWithRed
:
0
.
25
f
green
:
0
.
22
f
blue
:
0
.
21
f
alpha
:
1
.
00
f
];
_title
.
textAlignment
=
NSTextAlignmentCenter
;
_title
.
text
=
@"亮度"
;
}
return
_title
;
}
-
(
UIImageView
*
)
backImage
{
if
(
!
_backImage
)
{
_backImage
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
79
,
76
)];
_backImage
.
image
=
[
UIImage
imageNamed
:
@"brightness.png"
];
}
return
_backImage
;
}
-
(
UIView
*
)
brightnessLevelView
{
if
(
!
_brightnessLevelView
)
{
_brightnessLevelView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
13
,
132
,
self
.
bounds
.
size
.
width
-
26
,
7
)];
_brightnessLevelView
.
backgroundColor
=
[
UIColor
colorWithRed
:
0
.
25
f
green
:
0
.
22
f
blue
:
0
.
21
f
alpha
:
1
.
00
f
];
[
self
addSubview
:
_brightnessLevelView
];
}
return
_brightnessLevelView
;
}
#pragma mark - 单例
+
(
instancetype
)
sharedBrightnessView
{
static
BrightnessView
*
instance
;
static
dispatch_once_t
onceToken
;
dispatch_once
(
&
onceToken
,
^
{
instance
=
[[
BrightnessView
alloc
]
init
];
[[[
UIApplication
sharedApplication
].
windows
firstObject
]
addSubview
:
instance
];
});
return
instance
;
}
-
(
instancetype
)
init
{
if
(
self
=
[
super
init
])
{
[
self
setupUI
];
}
return
self
;
}
-
(
void
)
setupUI
{
self
.
frame
=
CGRectMake
(
ZLScreenWidth
*
0
.
5
,
ZLScreenHeight
*
0
.
5
-
20
,
155
,
155
);
self
.
layer
.
cornerRadius
=
10
;
self
.
layer
.
masksToBounds
=
YES
;
// 毛玻璃效果
UIToolbar
*
toolbar
=
[[
UIToolbar
alloc
]
initWithFrame
:
self
.
bounds
];
[
self
addSubview
:
toolbar
];
[
self
addSubview
:
self
.
backImage
];
[
self
addSubview
:
self
.
title
];
[
self
addSubview
:
self
.
brightnessLevelView
];
[
self
createTips
];
[
self
addStatusBarNotification
];
[
self
addKVOObserver
];
self
.
alpha
=
0
.
0
;
}
#pragma makr - 创建 Tips
-
(
void
)
createTips
{
self
.
tipArray
=
[
NSMutableArray
arrayWithCapacity
:
16
];
CGFloat
tipW
=
(
self
.
brightnessLevelView
.
bounds
.
size
.
width
-
17
)
/
16
;
CGFloat
tipH
=
5
;
CGFloat
tipY
=
1
;
for
(
int
i
=
0
;
i
<
16
;
i
++
)
{
CGFloat
tipX
=
i
*
(
tipW
+
1
)
+
1
;
UIImageView
*
image
=
[[
UIImageView
alloc
]
init
];
image
.
backgroundColor
=
[
UIColor
whiteColor
];
image
.
frame
=
CGRectMake
(
tipX
,
tipY
,
tipW
,
tipH
);
[
self
.
brightnessLevelView
addSubview
:
image
];
[
self
.
tipArray
addObject
:
image
];
}
[
self
updateBrightnessLevel
:[
UIScreen
mainScreen
].
brightness
];
}
#pragma makr - 通知 KVO
-
(
void
)
addStatusBarNotification
{
/** 注册 UIApplicationDidChangeStatusBarOrientationNotification -状态栏方向改变
*/
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector:
@selector
(
statusBarOrientationNotification
:)
name:
UIApplicationDidChangeStatusBarOrientationNotification
object:
nil
];
}
-
(
void
)
addKVOObserver
{
[[
UIScreen
mainScreen
]
addObserver
:
self
forKeyPath:
@"brightness"
options:
NSKeyValueObservingOptionNew
context
:
NULL
];
}
-
(
void
)
observeValueForKeyPath
:(
NSString
*
)
keyPath
ofObject
:(
id
)
object
change
:(
NSDictionary
*
)
change
context
:(
void
*
)
context
{
CGFloat
levelValue
=
[
change
[
@"new"
]
floatValue
];
[
self
removeTimer
];
[
self
appearBrightnessView
];
[
self
updateBrightnessLevel
:
levelValue
];
}
#pragma mark - 状态栏方向改变通知
-
(
void
)
statusBarOrientationNotification
:(
NSNotification
*
)
notify
{
[
self
setNeedsLayout
];
}
#pragma mark - Brightness显示 隐藏
-
(
void
)
appearBrightnessView
{
[
UIView
animateWithDuration
:
0
.
5
animations
:
^
{
self
.
alpha
=
1
;
}
completion
:^
(
BOOL
finished
)
{
[
self
addtimer
];
}];
}
-
(
void
)
disAppearBrightnessView
{
if
(
self
.
alpha
==
1
.
0
)
{
[
UIView
animateWithDuration
:
0
.
5
animations
:
^
{
self
.
alpha
=
0
.
0
;
}
completion
:^
(
BOOL
finished
)
{
[
self
removeTimer
];
}];
}
}
#pragma mark - 定时器
-
(
void
)
addtimer
{
if
(
self
.
timer
)
{
return
;
}
self
.
timer
=
[
NSTimer
timerWithTimeInterval
:
2
target:
self
selector:
@selector
(
disAppearBrightnessView
)
userInfo:
nil
repeats:
NO
];
[[
NSRunLoop
mainRunLoop
]
addTimer
:
self
.
timer
forMode
:
NSDefaultRunLoopMode
];
}
-
(
void
)
removeTimer
{
[
self
.
timer
invalidate
];
self
.
timer
=
nil
;
}
#pragma mark - 更新亮度值
-
(
void
)
updateBrightnessLevel
:(
CGFloat
)
brightnessLevel
{
CGFloat
stage
=
1
/
15
.
0
;
NSInteger
level
=
brightnessLevel
/
stage
;
for
(
int
i
=
0
;
i
<
self
.
tipArray
.
count
;
i
++
)
{
UIImageView
*
img
=
self
.
tipArray
[
i
];
if
(
i
<=
level
)
{
img
.
hidden
=
NO
;
}
else
{
img
.
hidden
=
YES
;
}
}
}
#pragma mark - 更新布局
-
(
void
)
layoutSubviews
{
[
super
layoutSubviews
];
//InterfaceOrientation值
UIInterfaceOrientation
currInterfaceOrientation
=
[[
UIApplication
sharedApplication
]
statusBarOrientation
];
switch
(
currInterfaceOrientation
)
{
case
UIInterfaceOrientationPortrait
:
case
UIInterfaceOrientationPortraitUpsideDown
:
{
self
.
center
=
CGPointMake
(
ZLScreenWidth
*
0
.
5
,
(
ZLScreenHeight
-
10
)
*
0
.
5
);
}
break
;
case
UIInterfaceOrientationLandscapeLeft
:
case
UIInterfaceOrientationLandscapeRight
:
{
self
.
center
=
CGPointMake
(
ZLScreenWidth
*
0
.
5
,
(
ZLScreenHeight
)
*
0
.
5
);
}
break
;
default:
break
;
}
self
.
backImage
.
center
=
CGPointMake
(
155
*
0
.
5
,
155
*
0
.
5
);
[
self
.
superview
bringSubviewToFront
:
self
];
}
#pragma mark - 销毁
-
(
void
)
dealloc
{
[[
UIScreen
mainScreen
]
removeObserver
:
self
forKeyPath
:
@"brightness"
];
[[
NSNotificationCenter
defaultCenter
]
removeObserver
:
self
];
}
@end
Demo/Demo/Classes/View/Player/DWPlayerTimeSilder.h
0 → 100644
View file @
98ebf965
//
// DWPlayerTimeSilder.h
// BrightnessVolumeView
//
// Created by zwl on 2020/3/12.
// Copyright © 2020 admin. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
DWPlayerTimeSilder
:
UIView
@property
(
nonatomic
,
assign
)
CGFloat
duration
;
@property
(
nonatomic
,
assign
)
CGFloat
progress
;
@end
Demo/Demo/Classes/View/Player/DWPlayerTimeSilder.m
0 → 100644
View file @
98ebf965
//
// DWPlayerTimeSilder.m
// BrightnessVolumeView
//
// Created by zwl on 2020/3/12.
// Copyright © 2020 admin. All rights reserved.
//
#import "DWPlayerTimeSilder.h"
@interface
DWPlayerTimeSilder
()
@property
(
nonatomic
,
strong
)
UILabel
*
timeLabel
;
@property
(
nonatomic
,
strong
)
UIView
*
progressView
;
@end
@implementation
DWPlayerTimeSilder
-
(
instancetype
)
init
{
self
=
[
super
init
];
if
(
self
)
{
self
.
timeLabel
=
[[
UILabel
alloc
]
init
];
self
.
timeLabel
.
font
=
[
UIFont
systemFontOfSize
:
12
];
self
.
timeLabel
.
textColor
=
[
UIColor
colorWithRed
:
255
/
255
.
0
green
:
146
/
255
.
0
blue
:
10
/
255
.
0
alpha
:
0
.
8
];
self
.
timeLabel
.
textAlignment
=
NSTextAlignmentCenter
;
[
self
addSubview
:
self
.
timeLabel
];
[
self
.
timeLabel
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
and
.
top
.
equalTo
(
@0
);
make
.
width
.
equalTo
(
self
);
make
.
height
.
equalTo
(
@12
);
}];
UIView
*
bgView
=
[[
UIView
alloc
]
init
];
bgView
.
backgroundColor
=
[
UIColor
colorWithWhite
:
1
alpha
:
0
.
8
];
bgView
.
layer
.
masksToBounds
=
YES
;
bgView
.
layer
.
cornerRadius
=
1
.
5
;
[
self
addSubview
:
bgView
];
[
bgView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
and
.
bottom
.
equalTo
(
@0
);
make
.
width
.
equalTo
(
self
);
make
.
height
.
equalTo
(
@4
);
}];
self
.
progressView
=
[[
UIView
alloc
]
init
];
self
.
progressView
.
backgroundColor
=
[
UIColor
colorWithRed
:
255
/
255
.
0
green
:
146
/
255
.
0
blue
:
10
/
255
.
0
alpha
:
0
.
8
];
[
bgView
addSubview
:
self
.
progressView
];
[
self
.
progressView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
equalTo
(
@0
);
make
.
top
.
equalTo
(
@0
);
make
.
height
.
equalTo
(
bgView
);
make
.
width
.
equalTo
(
@0
);
}];
}
return
self
;
}
-
(
void
)
setDuration
:(
CGFloat
)
duration
{
_duration
=
duration
;
NSString
*
time
=
[
NSString
stringWithFormat
:
@"00:00 / %@"
,
[
DWTools
formatSecondsToString
:
duration
]];
self
.
timeLabel
.
text
=
time
;
[
self
.
progressView
mas_updateConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
width
.
equalTo
(
@0
);
}];
}
-
(
void
)
setProgress
:(
CGFloat
)
progress
{
_progress
=
progress
;
NSString
*
time
=
[
NSString
stringWithFormat
:
@"%@ / %@"
,[
DWTools
formatSecondsToString
:
self
.
duration
*
progress
],[
DWTools
formatSecondsToString
:
self
.
duration
]];
self
.
timeLabel
.
text
=
time
;
//修改进度
[
self
.
progressView
mas_updateConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
width
.
equalTo
(
@
(
self
.
frame
.
size
.
width
*
progress
));
}];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
Demo/Demo/Classes/View/Player/DWVodPlayerPanGesture.h
0 → 100644
View file @
98ebf965
//
// DWVodPlayerPanGesture.h
// BrightnessVolumeView
//
// Created by zwl on 2020/3/11.
// Copyright © 2020 admin. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef
NS_ENUM
(
NSUInteger
,
DWVodPlayerPanGestureStatus
)
{
DWVodPlayerPanGestureStatusNone
,
//无
DWVodPlayerPanGestureStatusVolume
,
//音量调节
DWVodPlayerPanGestureStatusBrightness
,
//亮度调节
DWVodPlayerPanGestureStatusFast
,
//快进
DWVodPlayerPanGestureStatusRewind
//快退
};
@protocol
DWVodPlayerPanGestureDelegate
<
NSObject
>
//左右滑动事件结束
-
(
void
)
playerPanHandleEnd
:(
CGFloat
)
sliderProgress
;
@end
@interface
DWVodPlayerPanGesture
:
UIPanGestureRecognizer
-
(
instancetype
)
initWithFatherView
:(
UIView
*
)
fatherView
;
@property
(
nonatomic
,
assign
)
CGFloat
duration
;
@property
(
nonatomic
,
assign
)
CGFloat
progress
;
@property
(
nonatomic
,
assign
)
BOOL
canResponse
;
@property
(
nonatomic
,
weak
)
id
<
DWVodPlayerPanGestureDelegate
>
vodPanDelegate
;
@end
Demo/Demo/Classes/View/Player/DWVodPlayerPanGesture.m
0 → 100644
View file @
98ebf965
//
// DWVodPlayerPanGesture.m
// BrightnessVolumeView
//
// Created by zwl on 2020/3/11.
// Copyright © 2020 admin. All rights reserved.
//
#import "DWVodPlayerPanGesture.h"
#import "DWPlayerTimeSilder.h"
#import <MediaPlayer/MediaPlayer.h>
#import "BrightnessView.h"
@interface
DWVodPlayerPanGesture
()
@property
(
nonatomic
,
assign
)
DWVodPlayerPanGestureStatus
status
;
@property
(
nonatomic
,
weak
)
UIView
*
fatherView
;
//手势落点
@property
(
nonatomic
,
assign
)
CGPoint
location
;
@property
(
nonatomic
,
strong
)
DWPlayerTimeSilder
*
timeSilder
;
@property
(
nonatomic
,
assign
)
CGFloat
lastProgress
;
@property
(
nonatomic
,
strong
)
UISlider
*
volumeSlider
;
@property
(
nonatomic
,
assign
)
CGFloat
lastVolume
;
@property
(
nonatomic
,
assign
)
CGFloat
lastBrightness
;
@end
@implementation
DWVodPlayerPanGesture
-
(
instancetype
)
initWithFatherView
:(
UIView
*
)
fatherView
{
self
=
[
super
init
];
if
(
self
)
{
self
.
fatherView
=
fatherView
;
self
.
canResponse
=
YES
;
[
self
addTarget
:
self
action
:
@selector
(
handlePan
)];
[
self
.
fatherView
addGestureRecognizer
:
self
];
self
.
status
=
DWVodPlayerPanGestureStatusNone
;
[
BrightnessView
sharedBrightnessView
];
}
return
self
;
}
-
(
void
)
setDuration
:(
CGFloat
)
duration
{
_duration
=
duration
;
self
.
timeSilder
.
duration
=
duration
;
}
-
(
void
)
handlePan
{
//外部是否禁用手势
if
(
!
self
.
canResponse
)
{
return
;
}
//只在横屏状态下,相应手势
UIDeviceOrientation
orientation
=
[
UIDevice
currentDevice
].
orientation
;
UIInterfaceOrientation
interfaceOrientation
=
(
UIInterfaceOrientation
)
orientation
;
if
(
!
(
interfaceOrientation
==
UIInterfaceOrientationLandscapeLeft
||
interfaceOrientation
==
UIInterfaceOrientationLandscapeRight
))
{
return
;
}
//这个用于判断落点是在左边还是右边,判断音量 or 亮度
CGPoint
position
=
[
self
translationInView
:
self
.
view
];
CGFloat
absX
=
fabs
(
position
.
x
);
CGFloat
absY
=
fabs
(
position
.
y
);
switch
(
self
.
state
)
{
case
UIGestureRecognizerStateBegan
:
{
self
.
location
=
[
self
locationInView
:
self
.
view
];
self
.
lastProgress
=
self
.
progress
;
if
(
absX
>
absY
)
{
//左右滑动
if
(
position
.
x
<
0
)
{
//向左滑动
self
.
status
=
DWVodPlayerPanGestureStatusRewind
;
}
else
{
//向右滑动
self
.
status
=
DWVodPlayerPanGestureStatusFast
;
}
if
(
self
.
duration
==
0
)
{
return
;
}
self
.
timeSilder
.
hidden
=
NO
;
self
.
timeSilder
.
progress
=
self
.
lastProgress
;
}
else
{
//上下滑动
if
(
self
.
location
.
x
<=
CGRectGetWidth
(
self
.
view
.
frame
)
*
0
.
5
)
{
//亮度
self
.
status
=
DWVodPlayerPanGestureStatusBrightness
;
self
.
lastBrightness
=
[
UIScreen
mainScreen
].
brightness
;
}
else
{
//音量
self
.
status
=
DWVodPlayerPanGestureStatusVolume
;
self
.
lastVolume
=
[
self
getCurrentVolume
];
}
}
// NSLog(@"status %ld",self.status);
}
break
;
case
UIGestureRecognizerStateChanged
:
{
[
self
gestureChange
:
position
];
}
break
;