Skip to content

Commit

Permalink
Merge pull request #57 from rewardStyle/CC-2192-uat-1-medium-priority…
Browse files Browse the repository at this point in the history
…-issues
  • Loading branch information
sigsbeym authored Dec 20, 2024
2 parents 3f18d82 + 617c838 commit 2bb3f73
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let package = Package(
),
.package(
url: "https://github.com/rewardStyle/PryntTrimmerView",
.exact("4.0.3")
.exact("4.0.4")
)

],
Expand Down
13 changes: 13 additions & 0 deletions Source/Filters/Video/YPVideoFiltersVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)?
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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?()
}
})
}
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion YPImagePicker.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1373,7 +1373,7 @@
repositoryURL = "https://github.com/rewardstyle/prynttrimmerview";
requirement = {
kind = exactVersion;
version = 4.0.3;
version = 4.0.4;
};
};
EBA37BCB26F75BCC005DAAD4 /* XCRemoteSwiftPackageReference "Stevia" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
},
{
Expand Down

0 comments on commit 2bb3f73

Please sign in to comment.