diff --git a/Package.swift b/Package.swift index b244e1c4a..c7dec2a7f 100644 --- a/Package.swift +++ b/Package.swift @@ -18,7 +18,7 @@ let package = Package( ), .package( url: "https://github.com/rewardStyle/PryntTrimmerView", - .exact("4.0.3") + .exact("4.0.4") ) ], diff --git a/Source/Filters/Video/YPVideoFiltersVC.swift b/Source/Filters/Video/YPVideoFiltersVC.swift index 10b6f32d1..427769187 100644 --- a/Source/Filters/Video/YPVideoFiltersVC.swift +++ b/Source/Filters/Video/YPVideoFiltersVC.swift @@ -54,6 +54,7 @@ open class YPVideoFiltersVC: UIViewController, IsMediaFilterVC { public var shouldShowDone = false public weak var videoProcessingDelegate: YPVideoProcessingDelegate? public var isUsingCustomCoverImage = false + public var customCoverImageReplacedHandler: (() -> Void)? var coverImageTime: CMTime? var coverTrimTimes: (startTime: CMTime, endTime: CMTime)? @@ -142,6 +143,15 @@ open class YPVideoFiltersVC: UIViewController, IsMediaFilterVC { selector: #selector(itemDidFinishPlaying(_:)), name: .AVPlayerItemDidPlayToEndTime, object: videoView.player.currentItem) + NotificationCenter.default + .addObserver( + forName: UIApplication.willEnterForegroundNotification, + object: nil, + queue: .main + ) { [weak self] _ in + guard let self = self else { return } + self.setupGenerator(inputAsset) + } videoView.clipsToBounds = true coverImageView.clipsToBounds = true @@ -542,6 +552,8 @@ open class YPVideoFiltersVC: UIViewController, IsMediaFilterVC { self?.imageGenerator?.cancelAllCGImageGeneration() self?.coverImageView.image = UIImage(cgImage: image) self?.coverImageTime = time + self?.isUsingCustomCoverImage = false + self?.customCoverImageReplacedHandler?() } }) } @@ -618,6 +630,7 @@ extension YPVideoFiltersVC: YPTimeStampTrimmerViewDelegate { // MARK: - ThumbSelectorViewDelegate extension YPVideoFiltersVC: ThumbSelectorViewDelegate { public func didChangeThumbPosition(_ imageTime: CMTime) { + coverThumbSelectorView.resetThumbViewBorderColor() // fetch new image if !isUsingCustomCoverImage || vcType == .Cover { generateCoverImageAtTime(imageTime) diff --git a/YPImagePicker.xcodeproj/project.pbxproj b/YPImagePicker.xcodeproj/project.pbxproj index 9f48c4ad2..84adb0a87 100644 --- a/YPImagePicker.xcodeproj/project.pbxproj +++ b/YPImagePicker.xcodeproj/project.pbxproj @@ -1373,7 +1373,7 @@ repositoryURL = "https://github.com/rewardstyle/prynttrimmerview"; requirement = { kind = exactVersion; - version = 4.0.3; + version = 4.0.4; }; }; EBA37BCB26F75BCC005DAAD4 /* XCRemoteSwiftPackageReference "Stevia" */ = { diff --git a/YPImagePicker.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/YPImagePicker.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 979e0742d..9d7731844 100644 --- a/YPImagePicker.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/YPImagePicker.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/rewardstyle/prynttrimmerview", "state" : { - "revision" : "267a4b08213af5d8803e849c6ba7399928628752", - "version" : "4.0.3" + "revision" : "59379933130df86e35b6f6a60aefa7262368854a", + "version" : "4.0.4" } }, {