PrismVideo
PrismVideo provides an actor-based video downloader with progress streaming, video metadata modeling, and resolution detection — all built on AVFoundation with zero third-party dependencies.Video Entity
Type-safe metadata model with URL, title, duration, resolution, and thumbnail.
Async Downloader
Actor-isolated download with
AsyncStream progress updates and export session management.Resolution Detection
Automatic resolution classification — 4K, 1080p, 720p, SD — from pixel dimensions.
Video Entity
PrismVideoEntity models video metadata:
Video Entity
Properties
Video Resolution
PrismVideoResolution auto-classifies from pixel height:
Resolution Detection
Video Downloader
PrismVideoDownloader is an actor that downloads and exports video with real-time progress via AsyncStream:
Download Video with Progress
Download Status
How It Works
- Loads the remote
AVURLAssetand verifies it’s playable - Extracts video and audio tracks into an
AVMutableComposition - Exports using
AVAssetExportSessionwith highest quality preset - Streams progress at 100ms intervals via a Timer publisher
- Yields the final file URL on completion
Video Errors
PrismVideoError conforms to PrismError with descriptions, failure reasons, and recovery suggestions:
Error Handling