Commit e41afef7 by 李威

视频监听修改

parent cf5de308
......@@ -53,6 +53,9 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
@property (nonatomic ,strong)DXProgressBarView *progressBarView;
@property (nonatomic,strong) NSMutableArray *timeArray;
@end
......@@ -276,6 +279,14 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
weakSelf.playerView.assetURL = proxyURL;
};
self.playerView.playerPlayTimeChanged = ^(id<ZFPlayerMediaPlayback> _Nonnull asset, NSTimeInterval currentTime, NSTimeInterval duration) {
if (!weakSelf.progressBarView.timeArray) {
[weakSelf.progressBarView progressBarTimeArray:weakSelf.timeArray Totaltime:duration];
NSLog(@"当前播放时间=%f",currentTime);
}
weakSelf.progressBarView.playTime = currentTime;
};
_volumeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_volumeBtn setImage:[UIImage imageNamed:@"HFX_novolume"] forState:UIControlStateNormal];
......@@ -619,15 +630,7 @@ static NSString *dXHFXVideoCell = @"DXHFXVideoCell";
[titleTimeArray1 addObject:titleTime];
}
self.progressBarView.timeArray = nil;
HJSelfWeak;
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;
};
self.timeArray = timeArray;
return timeArray;
//
......
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