Skip to content

Latest commit

 

History

History
202 lines (191 loc) · 30.8 KB

AVKit.md

File metadata and controls

202 lines (191 loc) · 30.8 KB

AVKit

Symbols: 41.3% of Apple's iOS API (117 of 283, exact) · Rows: 9: 5 ✅ 1 🟡 3 ❌ · iOS: 8.0+

Area: Media · Apple: AVKit · Issues: area:media

How isim implements it

  • Adapted: player controls drawn by isim, a Picture in Picture shell window, and a simulated AirPlay route picker.

API

API / feature Status iOS Notes
AVKit AVPlayerViewController ✅ ≤17 iOS 17-style controls (play/pause, ±10 s, scrubber, elapsed/remaining, mute, close when presented, auto-hide), Picture in Picture, AirPlay (route picker) and playback-speed menu, delegate (PiP start/stop/restore, automatic dismissal); no info panels (customInfoViewControllers) or interstitials; tested (HelloVideo)
SwiftUI VideoPlayer (with videoOverlay) ✅ ≤17 the overlay does not take touches
Picture in Picture (AVPictureInPictureController), AVRoutePickerView 🟡 ≤17 adapted: on a booted device the shell floats the video in a corner window over apps and the home screen, with close / restore / skip / play-pause controls (ids pip-*, scriptable); isPictureInPicturePossible, automatic start from inline, delegate (restore user interface); with isim run the window is drawn in the app; the route picker is the AirPlay card (iPhone, headphones when plugged in, an AirPlay speaker whose sound still comes from the host); tested (HelloVideo: inline, system window over the home screen, controls, restore). Missing: the video-call ContentSource
AVPictureInPictureController.ContentSource(sampleBufferDisplayLayer:playbackDelegate:), AVPictureInPictureSampleBufferPlaybackDelegate, invalidatePlaybackState() ✅ ≤17 adapted: the layer's frames float in a window over the app (the system's window plays URLs, so not over the home screen); its play / pause, skip and close controls call the playback delegate, which also tells the play button's state; the delegate hears the window's render size; the layer shows iOS's placeholder meanwhile; tested (HelloSampleBuffers, test_sample_buffers)
Capture events: AVCaptureEventInteraction (init(handler:), init(primary:secondary:), isEnabled; iOS 26 defaultCaptureSoundDisabled), AVCaptureEvent (phase; iOS 26 shouldPlaySound, play(_:)), AVCaptureEventPhase, iOS 26 AVCaptureEventSound (cameraShutter, beginVideoRecording, endVideoRecording, init(url:)), SwiftUI onCameraCaptureEvent ✅ ≤17 adapted (onCameraCaptureEvent: 18.0): while an interaction is enabled in a view on screen and a capture session runs, the volume buttons (the bezel's, or volume up|down) and the Camera Control (cameracontrol press|down|up, the bezel's button on the iPhone 16 / 17 / Air) send it began and ended events instead of changing the volume, like iOS; volume down and the Camera Control are primary, volume up secondary; without a running session the buttons change the volume; sounds are the system sounds (1108, 1117, 1118) or the file; tested (HelloCapture: test_capture_camera_control_and_mattes, test_capture_events_swiftui_and_directions); Objective-C too (<AVKit/AVKit.h>, AVKit.framework: the interaction, events and sounds, #811; tested by CaptureControlsObjCTest)
iOS 27.1 AVCaptureDeviceDirectionCoordinator, AVCaptureDeviceDirectionMap, AVCaptureDeviceDescriptor ✅ 27.1 adapted: forward is toward the person looking at the view, so the front cameras face forward and the back cameras backward. On iPhone Duo the display in use decides (proposed geometry): unfolded, the inner ultra wide camera faces forward and the outer one backward; folded, the outer one faces forward and the inner one, folded in, neither way. The change handler runs on the main queue soon after the coordinator is made and again when the device folds or unfolds. Tested: test_capture_events_swiftui_and_directions, test_capture_directions_duo (HelloCapture under iOS 27.1)
Types not yet in isim (iOS 17 and earlier) ❌ ≤17 not implemented, found by the 2026-10 sweep: AVInterstitialTimeRange, AVKitError, AVKitError.Code, AVPictureInPictureVideoCallViewController (4 types left; the capture event types are in isim since #382; with their members under "Not yet in isim")
Types not yet in isim (iOS 26) ❌ 26.0 not implemented, found by the 2026-10 sweep: AVDisplayDynamicRange, AVInputPickerInteraction, AVLegibleMediaOptionsMenuController, AVLegibleMediaOptionsMenuState (4 types left; with their members under "Not yet in isim")
Types not yet in isim (iOS 27) ❌ 27.0 not implemented, found by the 2026-10 sweep: AVPlaybackUserInterfaceContentArtwork, AVPlaybackUserInterfaceContentMetadata, AVPlaybackUserInterfaceContentURLArtwork, AVPlaybackUserInterfaceControllable, AVPlaybackUserInterfaceMediaSelectionControllable, AVPlaybackUserInterfaceMediaSelectionOption, AVPlaybackUserInterfaceMetadataProviding, AVPlaybackUserInterfacePlaybackControllable, AVPlaybackUserInterfacePlaybackPosition, AVPlaybackUserInterfacePlaybackState, AVPlaybackUserInterfaceSeekCapabilities, AVPlaybackUserInterfaceTimeControllable, AVPlaybackUserInterfaceTimelineSegment, AVPlaybackUserInterfaceTimelineSegmentType, AVPlaybackUserInterfaceVolumeControllable (15 types left; the device direction types are in isim since #382; with their members under "Not yet in isim")

Not yet in isim

166 symbols Apple documents for iOS that isim does not have (exact; Apple snapshot 2026-10-14). Each links to Apple's documentation.

List