NextLevelClip

public class NextLevelClip: NSObject

NextLevelClip, an object for managing a single media clip

  • url

    URL of the clip

    Declaration

    Swift

    public var url: URL?
  • True, if the clip’s file exists

    Declaration

    Swift

    public var fileExists: Bool
  • AVAsset of the clip

    Declaration

    Swift

    public var asset: AVAsset?
  • Duration of the clip, otherwise invalid.

    Declaration

    Swift

    public var duration: CMTime
  • Set to true if the clip’s audio should be muted in the merged file

    Declaration

    Swift

    public var isMutedOnMerge = false
  • If it doesn’t already exist, generates a thumbnail image of the clip.

    Declaration

    Swift

    public var thumbnailImage: UIImage?
  • If it doesn’t already exist, generates an image for the last frame of the clip.

    Declaration

    Swift

    public var lastFrameImage: UIImage?
  • Frame rate at which the asset was recorded.

    Declaration

    Swift

    public var frameRate: Float
  • Dictionary containing metadata about the clip.

    Declaration

    Swift

    public var infoDict: [String: Any]?
  • Dictionary containing data for re-initialization of the clip.

    Declaration

    Swift

    public var representationDict: [String:Any]?
  • Class method initializer for a clip URL

  • Parameters:

    • filename: Filename for the media asset
    • directoryPath: Directory path for the media asset
  • Returns

    Returns a URL for the designated clip, otherwise nil

    Declaration

    Swift

    public class func clipURL(withFilename filename: String, directoryPath: String) -> URL?
  • Class method initializer for a NextLevelClip

  • Parameters:

    • url: URL of the media asset
    • infoDict: Dictionary containing metadata about the clip
  • Returns

    Returns a NextLevelClip

    Declaration

    Swift

    public class func clip(withUrl url: URL?, infoDict: [String: Any]?) -> NextLevelClip
  • Removes the associated file representation on disk.

    Declaration

    Swift

    public func removeFile()