avkit
Create media playback experiences using AVKit. Use when adding video players with AVPlayerViewController, enabling Picture-in-Picture, routing media with AirPlay, using SwiftUI VideoPlayer views, configuring transport controls, displaying subtitles and closed captions, or integrating AVFoundation playback with system UI.
npx skills add dpearson2699/swift-ios-skills --skill avkit --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# AVKit High-level media playback UI built on AVFoundation. Provides system-standard video players, Picture-in-Picture, AirPlay routing, transport controls, and subtitle/caption display. Targets Swift 6.3 / iOS 26+. ## Contents - [Setup](#setup) - [AVPlayerViewController](#avplayerviewcontroller) - [SwiftUI VideoPlayer](#swiftui-videoplayer) - [Picture-in-Picture](#picture-in-picture) - [AirPlay](#airplay) - [Transport Controls and Playback Speed](#transport-controls-and-playback-speed) - [Subtitles and Closed Captions](#subtitles-and-closed-captions) - [Common Mistakes](#common-mistakes) - [Review Checklist](#review-checklist) - [References](#references) ## Setup ### Audio Session Configuration Playback apps need an audio session category and the matching background mode when they support background audio, AirPlay, or PiP. 1. Enable Background Modes > Audio, AirPlay, and Picture in Picture (the `audio` value in `UIBackgroundModes`) 2. Set the audio session category to `.playback` 3. Defer `setActive(true)` until playback begins so you do not interrupt other audio prematurely ```swift import AVFoundation func configureAudioSessionForPlayback() { let session = AVAudioSession.sharedI
- Contents
- Setup
- Audio Session Configuration
- Imports
- AVPlayerViewController
- Basic Presentation (Full Screen)
- Inline (Embedded) Playback
- Key Properties
- Delegate
- Display Readiness
- SwiftUI VideoPlayer
- Basic Usage
- Video Overlay
- UIKit Hosting for Advanced Control
What does the avkit skill do?
Create media playback experiences using AVKit. Use when adding video players with AVPlayerViewController, enabling Picture-in-Picture, routing media with AirPlay, using SwiftUI VideoPlayer views, configuring transport controls, displaying subtitles and closed captions, or integrating AVFoundation playback with system UI.
How do I install it?
Run `npx skills add dpearson2699/swift-ios-skills --skill avkit --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From dpearson2699/swift-ios-skills, a repository with 963 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.