What problem does it solve?
This Skill helps you add high-quality, system-standard video playback to your iOS apps by wiring up AVKit features like PiP, AirPlay, subtitles, and transport controls with correct SwiftUI and AVFoundation integration.
Core Features & Use Cases
- System-standard playback UI: Use AVPlayerViewController for familiar controls, transport behavior, and playback management.
- SwiftUI-friendly integration: Embed playback using SwiftUI VideoPlayer or a UIViewControllerRepresentable wrapper for advanced configuration and delegate callbacks.
- Picture-in-Picture (PiP): Enable PiP, configure automatic inline-to-PiP transitions, and implement proper restore-user-interface handling.
- AirPlay routing: Add an AVRoutePickerView and ensure external playback is allowed on AVPlayer.
- Subtitles and captions: Display legible tracks, restrict subtitle languages, and optionally require full subtitles.
- Transport controls & playback speed: Configure skip behavior, playback speeds, and Now Playing info integration.
- Common pitfalls and guardrails: Apply recommended setup steps (audio session, background modes) and avoid unsupported subclassing patterns.
Quick Start
Ask for “a SwiftUI VideoPlayer or AVPlayerViewController wrapper that supports Picture-in-Picture, AirPlay routing, subtitle language filtering, and a properly implemented PiP restore delegate for PiP stops.”