Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimum trim video issue #52

Open
tallot13 opened this issue Jul 31, 2019 · 0 comments
Open

Minimum trim video issue #52

tallot13 opened this issue Jul 31, 2019 · 0 comments

Comments

@tallot13
Copy link

tallot13 commented Jul 31, 2019

from PryntTrimmerView.swift
/// The minimum duration allowed for the trimming. The handles won't pan further if the minimum duration is attained.
public var minDuration: Double = 3
I trim to the minimum possible, but in didChangePositionBar from TrimmerViewDelegate

let timeRange = CMTimeRangeFromTimeToTime(start: trimmerView.startTime ?? CMTime.zero, end: trimmerView.endTime ?? inputAsset.duration)
print("time range duration seconds: \(timeRange.duration.seconds)")
print("time range duration: \(timeRange.duration)")

Output:

time range duration seconds: 2.995
time range duration: CMTime(value: 1797, timescale: 600, flags: __C.CMTimeFlags(rawValue: 1), epoch: 0)

time range duration seconds: 2.993333333333333
time range duration: CMTime(value: 1796, timescale: 600, flags: __C.CMTimeFlags(rawValue: 1), epoch: 0)

I have a strict check on the length of the video and its minimum 3 seconds, but with such a duration the check fails

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant