avkit

Community

Polished media playback with PiP & AirPlay

AuthorDFly7
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Building reliable, system-standard media playback experiences on iOS can be error-prone and fragmented across UIKit and SwiftUI, causing issues with background audio, Picture-in-Picture, AirPlay routing, subtitles, transport controls, and integration with system Now Playing controls. This Skill consolidates best practices, common pitfalls, and implementation patterns so developers can ship robust video playback without platform regressions.

Core Features & Use Cases

  • System-standard playback: Use AVPlayerViewController and AVPlayer to present video with native transport controls, subtitles, and Now Playing integration.
  • Picture-in-Picture & AirPlay: Enable PiP for inline and full-screen players and add AVRoutePickerView or external playback configuration for AirPlay support.
  • SwiftUI and custom UIs: Use VideoPlayer for simple SwiftUI layouts or wrap AVPlayerViewController / AVPlayerLayer for PiP, delegate callbacks, and advanced control.
  • Error handling & production concerns: Configure AVAudioSession, handle player item status and timeControlStatus, enforce linear playback during interstitials, and observe isReadyForDisplay to avoid black frames.
  • Use case: Ship a news or streaming app that supports HLS with multilingual subtitles, ad interstitials that require linear playback, PiP restore behavior, and AirPlay casting.

Quick Start

Configure the app's Info.plist for audio background mode and set AVAudioSession to .playback, then present AVPlayerViewController with your AVPlayer to begin playback.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: avkit
Download link: https://github.com/DFly7/iOS-FastAPI-Supabase-AI/archive/main.zip#avkit

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.