VKRecorderClip
@objc
public class VKRecorderClip : NSObject, VKRecorderClipProtocol
VKRecorderClip, an object for managing a single media clip
-
Unique identifier for a clip
Declaration
Swift
public var uuid: UUID { get }
-
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 clipDeclaration
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: VKImage? { get }
-
If it doesn’t already exist, generates an image for the last frame of the clip.
Declaration
Swift
public var lastFrameImage: VKImage? { 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 VKRecorderClip
Declaration
Swift
public class func clip(withUrl url: URL?, infoDict: [String : Any]?) -> VKRecorderClip
Parameters
url
URL of the media asset
infoDict
Dictionary containing metadata about the clip
Return Value
Returns a VKRecorderClip
-
Declaration
Swift
public convenience init(withClip clip: VKRecorderClipProtocol)
-
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 VKRecorderClip 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()
-
If clip url was changed (e.g. in case of a trim), return the initial revision
Declaration
Swift
public func initialRevision() -> URL?