diff --git a/Source/Pages/Gallery/YPAssetZoomableView.swift b/Source/Pages/Gallery/YPAssetZoomableView.swift index b8ce2210..7c445393 100644 --- a/Source/Pages/Gallery/YPAssetZoomableView.swift +++ b/Source/Pages/Gallery/YPAssetZoomableView.swift @@ -21,6 +21,7 @@ final class YPAssetZoomableView: UIScrollView { public weak var zoomableViewDelegate: YPAssetZoomableViewDelegate? public var cropAreaDidChange = {} public var isVideoMode = false + public var isVideoMuted = false public var photoImageView = UIImageView() public var videoView = YPVideoView() public var squaredZoomScale: CGFloat = 1 @@ -123,6 +124,7 @@ final class YPAssetZoomableView: UIScrollView { strongSelf.currentAsset = video strongSelf.videoView.loadVideo(playerItem) + strongSelf.videoView.player.isMuted = strongSelf.isVideoMuted strongSelf.videoView.play() strongSelf.zoomableViewDelegate?.ypAssetZoomableViewDidLayoutSubviews(strongSelf) } diff --git a/Source/Pages/Gallery/YPLibraryView.swift b/Source/Pages/Gallery/YPLibraryView.swift index 916e29c6..824abbb7 100644 --- a/Source/Pages/Gallery/YPLibraryView.swift +++ b/Source/Pages/Gallery/YPLibraryView.swift @@ -35,6 +35,7 @@ internal final class YPLibraryView: UIView { }() internal let assetZoomableView: YPAssetZoomableView = { let v = YPAssetZoomableView(frame: .zero) + v.isVideoMuted = YPConfig.library.isBulkUploading v.accessibilityIdentifier = "assetZoomableView" return v }() diff --git a/Source/Pages/Gallery/YPLibraryViewCell.swift b/Source/Pages/Gallery/YPLibraryViewCell.swift index ea07cd1e..6539c4f0 100644 --- a/Source/Pages/Gallery/YPLibraryViewCell.swift +++ b/Source/Pages/Gallery/YPLibraryViewCell.swift @@ -57,6 +57,9 @@ class YPMultipleSelectionIndicator: UIView { func set(number: Int?) { label.isHidden = (number == nil) + let isHiddenDuringBulkUploads = YPConfig.library.isBulkUploading && number == nil + circle.isHidden = isHiddenDuringBulkUploads + imageView.isHidden = isHiddenDuringBulkUploads if let number = number { circle.backgroundColor = selectionColor circle.layer.borderColor = selectionBorderColor.cgColor @@ -99,7 +102,7 @@ class YPLibraryViewCell: UICollectionViewCell { layout( 3, - multipleSelectionIndicator-3-| + YPConfig.library.isBulkUploading ? |-3-multipleSelectionIndicator : multipleSelectionIndicator-3-| ) imageView.contentMode = .scaleAspectFill