avkit

Integrate AVKit media playback with SwiftUI and AVPlayerViewController for PiP, AirPlay, and subtitles.

Updated May 10, 2026
One-click install
npx skills add https://github.com/FelixRauch/medat-figuren --skill avkit-felixrauch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: avkit
Source: https://github.com/FelixRauch/medat-figuren/tree/main/.agents/skills/avkit
Command: npx skills add https://github.com/FelixRauch/medat-figuren --skill avkit-felixrauch

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

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.”

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 a SwiftUI video player?

To add Picture-in-Picture to a SwiftUI video player, you need correct AVAudioSession setup and a properly implemented PiP restore delegate. You can embed playback using SwiftUI VideoPlayer or a UIViewControllerRepresentable wrapper for advanced delegate callbacks.

Can I filter subtitle languages and display captions with AVPlayerViewController?

Yes, you can filter subtitle languages and display captions with AVPlayerViewController. The Skill configures legible tracks, restricts specific subtitle languages, and optionally requires full subtitles for accessibility compliance.

How do I set up AirPlay routing with AVPlayer in iOS?

To set up AirPlay routing with AVPlayer in iOS, you add an AVRoutePickerView to your interface and ensure external playback is allowed on the AVPlayer instance. This enables standard external device routing.

What is the best way to integrate AVKit transport controls and playback speed selection?

The best way to integrate AVKit transport controls and playback speed selection is through AVPlayerViewController. It provides familiar system-standard controls, configurable skip behavior, playback speeds, and Now Playing info integration.

Why does Picture-in-Picture stop working when switching from full-screen playback?

Picture-in-Picture stops working during full-screen transitions if you lack safe handling of full-screen and PiP restore behavior. Avoid unsupported subclassing patterns and implement proper restore-user-interface delegate handling.