init(id:supportedAspectRatios:preview:video:)
Creates an animated artwork whose preview and video assets load on demand.
Declaration
init(id: String, supportedAspectRatios: [AnimatedArtwork.AspectRatio] = [.square], preview previewProvider: @escaping @Sendable (CGSize, AnimatedArtwork.AspectRatio) async throws -> ArtworkRepresentation, video videoProvider: @escaping @Sendable (CGSize, AnimatedArtwork.AspectRatio) async throws -> URL)Parameters
- id:
A unique identifier for this artwork.
- supportedAspectRatios:
The aspect ratios your app supports.
- previewProvider:
A closure that loads a preview image for the specified size and aspect ratio.
- videoProvider:
A closure that provides a URL to a video file for the specified size and aspect ratio.