|
@@ -32,7 +32,7 @@ class BFVideoThumbProgressView: UIView {
|
|
iv.clipsToBounds = true
|
|
iv.clipsToBounds = true
|
|
sself.progressView.contentView.addSubview(iv)
|
|
sself.progressView.contentView.addSubview(iv)
|
|
iv.snp.makeConstraints { make in
|
|
iv.snp.makeConstraints { make in
|
|
- make.left.equalTo(CGFloat(i) * sself.thumbImageWidth + sself.width * 0.5)
|
|
|
|
|
|
+ make.left.equalTo(CGFloat(i) * CGFloat(sself.thumbImageWidth) + sself.width * 0.5)
|
|
make.top.bottom.equalToSuperview()
|
|
make.top.bottom.equalToSuperview()
|
|
make.height.equalTo(50)
|
|
make.height.equalTo(50)
|
|
make.width.equalTo(sself.thumbImageWidth)
|
|
make.width.equalTo(sself.thumbImageWidth)
|
|
@@ -73,7 +73,7 @@ class BFVideoThumbProgressView: UIView {
|
|
didSet{
|
|
didSet{
|
|
if let second = self.videoAsset?.duration.seconds, second > 0 {
|
|
if let second = self.videoAsset?.duration.seconds, second > 0 {
|
|
let w = progressView.contentSize.width - width
|
|
let w = progressView.contentSize.width - width
|
|
- progressView.contentOffset = CGPoint(x: progress * w / second, y: 0)
|
|
|
|
|
|
+ progressView.contentOffset = CGPoint(x: progress * Double(w) / second, y: 0)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|