Skip to content

Minimum trim video issue #52

Description

@tallot13

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions