NextLevelClip

public class NextLevelClip

NextLevelClip, an object for managing a single media clip

  • Unique identifier for a clip

    Declaration

    Swift

    public var uuid: UUID { get }
  • url

    URL of the clip

    Declaration

    Swift

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

    Declaration

    Swift

    public var fileExists: Bool { get }
  • AVAsset of the clip

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

    public class func clipURL(withFilename filename: String, directoryPath: String) -> URL?

    Parameters

    filename

    Filename for the media asset

    directoryPath

    Directory path for the media asset

    Return Value

    Returns a URL for the designated clip, otherwise nil

  • Class method initializer for a NextLevelClip

    Declaration

    Swift

    public class func clip(withUrl url: URL?, infoDict: [String : Any]?) -> NextLevelClip

    Parameters

    url

    URL of the media asset

    infoDict

    Dictionary containing metadata about the clip

    Return Value

    Returns a NextLevelClip

  • Initialize a clip from a URL and dictionary.

    Declaration

    Swift

    public convenience init(url: URL?, infoDict: [String : Any]?)

    Parameters

    url

    URL and filename of the specified media asset

    infoDict

    Dictionary with NextLevelClip metadata information

  • Initialize a clip from a dictionary representation and directory name

    Declaration

    Swift

    public convenience init(directoryPath: String, representationDict: [String : Any]?)

    Parameters

    directoryPath

    Directory where the media asset is located

    representationDict

    Dictionary containing defining metadata about the clip

  • Removes the associated file representation on disk.

    Declaration

    Swift

    public func removeFile()