avkit

Configure AVKit video playback with PiP, AirPlay, and subtitles.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/harshav167/build-ios-apps --skill avkit-harshav167
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: avkit
Source: https://github.com/harshav167/build-ios-apps/tree/main/skills/avkit
Command: npx skills add https://github.com/harshav167/build-ios-apps --skill avkit-harshav167

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provide robust iOS video playback capabilities using AVKit to deliver native, system-integrated media experiences with PiP, AirPlay, and subtitle support.

Core Features & Use Cases

  • UIKit-based playback with AVPlayerViewController, including PiP and AirPlay integration.
  • SwiftUI VideoPlayer wrapper for declarative UI and seamless embedding in modern apps.
  • Subtitle and caption handling, external playback configuration, and Now Playing metadata integration.
  • Use Case: Build a media-centric app that streams live video with PiP while the user navigates other screens.

Quick Start

Load a video URL into an AVPlayer and present it with AVPlayerViewController or SwiftUI, enabling PiP and AirPlay as needed.

Frequently Asked Questions about avkit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Picture-in-Picture support to an iOS video player?

To add Picture-in-Picture support, configure AVPlayerViewController with PiP integration, allowing users to navigate other screens while live video streams continue playing in a floating window.

Can I use SwiftUI VideoPlayer for inline video playback with subtitles?

Yes, SwiftUI VideoPlayer wraps AVPlayer for declarative inline video playback and supports subtitle and caption handling, enabling seamless embedding of video content within modern iOS app layouts.

What's the best way to implement AirPlay routing in an AVKit video player?

Implement AirPlay routing by configuring AVKit and AVFoundation external playback settings within AVPlayerViewController, enabling users to cast video streams to compatible external devices and speakers.

Does AVKit work with both UIKit and SwiftUI for building video playback UIs?

AVKit supports both UIKit and SwiftUI, offering AVPlayerViewController for UIKit-based presentations and the SwiftUI VideoPlayer wrapper for declarative UI integration across modern iOS applications.

How do I handle playback errors and audio session configuration with AVPlayer?

Handle AVPlayer playback errors by implementing safe delegate patterns and configuring AVFoundation audio session settings, ensuring error resilience and proper audio routing across platform constraints.

How do I integrate Now Playing metadata into an iOS video streaming app?

Integrate Now Playing metadata by configuring AVKit and AVFoundation settings to display current media information on the lock screen and control center during active video playback sessions.