AVAsset
-
Mechanica
Generates a thumbnail image.
Example:
let url = URL(string: "https://link/to/video.mp4")! let asset = AVAsset(url: url) let thumbnail = asset.thumbnail(fromTime: 5)
Throws
Throws an error if no thumbnail could be created.Note
This function may take some time to complete: it’s recommended to dispatch the call on another queue if the thumbnail is not generated from a local resource.