VideoClip
@objcMembers
@objc(PESDKVideoClip)
open class VideoClip : NSObject
A VideoClip
represents a single video clip in a video clip category. Each video clip needs a
video URL and a thumbnail image. If no thumbnail is provided, it is automatically generated.
-
A unique string that makes the video clip uniquely identifiable.
Declaration
Swift
public let identifier: String
-
The title of the video clip.
Declaration
Swift
public let title: String?
-
The artist of the video clip.
Declaration
Swift
public let artist: String?
-
The URL for the thumbnail image of the video clip. If
nil
the thumbnail will be automatically generated from thevideoURL
.Declaration
Swift
public let thumbnailURL: URL?
-
The URL for the video clip.
Note
Video clips from remote resources can be used in the editor but their use is not optimized. Remote resources should be downloaded in advance and then passed to the editor as local resources.Declaration
Swift
public let videoURL: URL
-
Creates a new
VideoClip
object with the given identifier and video URL.Declaration
Swift
public convenience init(identifier: String, videoURL: URL)
Parameters
identifier
The identifier of the video clip.
videoURL
The URL to the underlying video.
-
Creates a new
VideoClip
object with the given identifier, video URL, an optional title, an optional artist as well as an optional thumbnail URL.Declaration
Swift
public init(identifier: String, videoURL: URL, title: String?, artist: String?, thumbnailURL: URL?)
Parameters
identifier
The title of the video clip.
title
The title of the video clip.
videoURL
The URL to the underlying video.
artist
The artist of the video clip.
thumbnailURL
The URL for the thumbnail image of the video clip.
-
Returns the first video clip with the given identifier if available.
Note
This is a wrapper for
AssetCatalog.shared
.Declaration
Swift
public static func withIdentifier(_ identifier: String) -> VideoClip?
Parameters
identifier
The identifier of the video clip to look for.
Return Value
The video clip with the given identifier or
nil
.