2026 Accessibility & InclusionAudio & Video
WWDC26 · 11 min · Accessibility & Inclusion / Audio & Video
Discover generated subtitles and subtitle styles
Make your video content more accessible with generated subtitles — a powerful new feature that can transcribe spoken audio or translate subtitles from another language, using on-device models. Explore caption style preview, which lets people customize and preview subtitle styles during playback, and dive into implementation details for AVKit, AVPlayerLayer, and the Media Accessibility framework.
Watch at developer.apple.com ↗Chapters
Code shown on screen · 1 snippet
Implement subtitle style preview
// Implement subtitle style preview
import AVFoundation
import MediaAccessibility
func updateProfileList() {
subtitleStyleProfileIDs = MACaptionAppearanceCopyProfileIDs() as? [String] ?? []
}
func showPreviewStyle(subtitleStyleProfileID: String) {
playerLayer.setCaptionPreviewProfileID(subtitleStyleProfileID, position: .zero, text: nil)
}
func stopPreviewStyle() {
playerLayer.stopShowingCaptionPreview()
}
func setSubtitleStyle(subtitleStyleProfileID: CFString) {
MACaptionAppearanceSetActiveProfileID(subtitleStyleProfileID)
}