yattee/Extensions/CMTime+DefaultTimescale.swift

11 lines
278 B
Swift
Raw Permalink Normal View History

import CoreMedia
import Foundation
extension CMTime {
static let defaultTimescale: CMTimeScale = 1_000_000
static func secondsInDefaultTimescale(_ seconds: TimeInterval) -> CMTime {
CMTime(seconds: seconds, preferredTimescale: CMTime.defaultTimescale)
}
}