|
@@ -205,6 +205,12 @@ class MVPlayControlViewCell: UICollectionViewCell {
|
|
|
func addData() {
|
|
|
pauseClick()
|
|
|
progressView.progress = 0
|
|
|
+ if (videoData?.height ?? 0) <= (videoData?.width ?? 0) {
|
|
|
+ coverImageView.contentMode = .scaleAspectFit
|
|
|
+ } else {
|
|
|
+ coverImageView.contentMode = .scaleAspectFill
|
|
|
+ }
|
|
|
+ coverImageView.clipsToBounds = true
|
|
|
let coverImg = (videoData?.videoCoverSnapshotPath != nil && (videoData?.videoCoverSnapshotPath?.count ?? 0) > 0) ? videoData?.videoCoverSnapshotPath ?? "" : videoData?.coverImg?["coverImgPath"] as! String
|
|
|
coverImageView.setNetImage(url: coverImg)
|
|
|
if videoData?.shareCountFriend != nil, videoData?.shareCountFriend ?? 0 > 0 {
|
|
@@ -322,13 +328,13 @@ class MVPlayControlViewCell: UICollectionViewCell {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- func pauseClick(isHidden:Bool = true,isSelected:Bool = false) -> Void {
|
|
|
+ func pauseClick(isHidden: Bool = true, isSelected: Bool = false) {
|
|
|
pauseBtn.isHidden = isHidden
|
|
|
pauseBtn.isSelected = isSelected
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
@objc func tagClick() {
|
|
|
- if pauseBtn.isSelected && !pauseBtn.isHidden && !isNetConnected() {
|
|
|
+ if pauseBtn.isSelected, !pauseBtn.isHidden, !isNetConnected() {
|
|
|
cShowHUB(superView: self, msg: "没有网络连接")
|
|
|
return
|
|
|
}
|