Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DrWater
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
路少雄
DrWater
Commits
d2a9569c
Commit
d2a9569c
authored
Mar 19, 2024
by
李威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
进度条修改
parent
e78ce649
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
7 deletions
+41
-7
DJMHomeTY/Page/DRFacial/View/DXHFXView.m
+24
-4
DJMHomeTY/Page/DRFacial/View/DXProgressBarView.m
+17
-3
No files found.
DJMHomeTY/Page/DRFacial/View/DXHFXView.m
View file @
d2a9569c
...
...
@@ -588,7 +588,7 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
weakSelf
.
popBgView
.
hidden
=
YES
;
}];
}
-
(
void
)
setTimeLineWithString
:
(
NSString
*
)
describeInfo
{
-
(
NSMutableArray
*
)
setTimeLineWithString
:
(
NSString
*
)
describeInfo
{
self
.
timesBtnArray
=
[
NSMutableArray
array
];
NSArray
*
itemTitleArray
=
[
describeInfo
componentsSeparatedByString
:
@","
];
...
...
@@ -619,8 +619,8 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
[
titleTimeArray1
addObject
:
titleTime
];
}
NSInteger
vvv
=
self
.
playerView
.
totalTime
;
[
self
.
progressBarView
progressBarTimeArray
:
timeArray
Totaltime
:
vvv
];
return
timeArray
;
//
// if(itemTitleArray.count > 1){
// _timeScrollView = [[UIScrollView alloc] init];
...
...
@@ -719,6 +719,14 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
//
}
-
(
void
)
playVideoTime
:
(
CGFloat
)
time
{
[
self
.
playerView
seekToTime
:
time
completionHandler
:
^
(
BOOL
finished
)
{
}];
}
-
(
void
)
changeViewPlayTime
:
(
UIButton
*
)
sender
{
// NSArray *stringUrlOne = [sender.titleLabel.text componentsSeparatedByString:@"s"];
...
...
@@ -764,7 +772,17 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
_allfaceBtn
.
hidden
=
YES
;
[
_allfaceBtn
setTitle
:
_currentVideoList
[
0
].
detail
forState
:
UIControlStateNormal
];
}
[
self
setTimeLineWithString
:
_currentVideoList
[
0
].
describeInfo
];
NSMutableArray
*
timeArray
=
[
self
setTimeLineWithString
:
_currentVideoList
[
0
].
describeInfo
];
self
.
playerView
.
playerPlayTimeChanged
=
^
(
id
<
ZFPlayerMediaPlayback
>
_Nonnull
asset
,
NSTimeInterval
currentTime
,
NSTimeInterval
duration
)
{
if
(
!
weakSelf
.
progressBarView
.
timeArray
)
{
[
weakSelf
.
progressBarView
progressBarTimeArray
:
timeArray
Totaltime
:
duration
];
NSLog
(
@"当前播放时间=%f"
,
currentTime
);
}
weakSelf
.
progressBarView
.
playTime
=
currentTime
;
};
[
_collectionView
reloadData
];
}
...
...
@@ -883,6 +901,8 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
weakSelf
.
playerView
.
assetURL
=
proxyURL
;
};
}
-
(
void
)
setCurrentVideoList
:
(
NSMutableArray
<
DXHFXVideoDetailsModel
*>
*
)
currentVideoList
{
...
...
DJMHomeTY/Page/DRFacial/View/DXProgressBarView.m
View file @
d2a9569c
...
...
@@ -19,9 +19,20 @@
-
(
void
)
progressBarTimeArray
:(
NSArray
*
)
array
Totaltime
:(
CGFloat
)
time
{
[
self
.
subviews
makeObjectsPerformSelector
:
@selector
(
removeFromSuperview
)];
NSMutableArray
*
timeArray
=
[
NSMutableArray
arrayWithCapacity
:
0
];
for
(
int
i
=
0
;
i
<
array
.
count
;
i
++
)
{
if
(
i
==
array
.
count
-
1
)
{
[
timeArray
addObject
:[
NSNumber
numberWithFloat
:(
time
-
[
array
[
i
]
floatValue
])]];
}
else
{
[
timeArray
addObject
:
array
[
i
+
1
]];
}
}
self
.
totaltime
=
time
;
self
.
timeArray
=
array
;
self
.
timeArray
=
timeArray
;
UIView
*
backView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
18
.
5
,
10
,
HJScreenWidth
-
18
.
5
*
2
,
6
.
5
)];
backView
.
backgroundColor
=
XHColorRGB_Alpha
(
175
,
44
,
35
,
0
.
12
);
backView
.
layer
.
cornerRadius
=
backView
.
height
/
2
;
...
...
@@ -34,8 +45,11 @@
CGFloat
currentLength
=
0
;
CGFloat
node
=
0
;
for
(
int
i
=
0
;
i
<
array
.
count
;
i
++
)
{
CGFloat
length
=
[[
array
objectAtIndex
:
i
]
floatValue
];
for
(
int
i
=
0
;
i
<
timeArray
.
count
;
i
++
)
{
CGFloat
length
=
[[
timeArray
objectAtIndex
:
i
]
floatValue
];
node
=
node
+
length
;
CGFloat
proportion
=
node
/
time
;
...
...
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