# AVPlayer 0.4.0 coverage

This release keeps the original playback-only audit green and layers in a broader AVFoundation expansion covering metadata groups, media selection, asset variants, fragmented assets, reader adaptors, and sample-buffer display.

| Area | Swift bridge | Rust module | Example | Test | Notes |
| --- | --- | --- | --- | --- | --- |
| `AVPlayer` | `swift-bridge/Sources/AVPlayerBridge/Player.swift` | `src/player.rs`, `src/player_media_selection_criteria.rs` | `examples/04_avplayer.rs` | `tests/avplayer.rs` | Core playback, time observers, time-control/waiting reasons, rate-change observation, HDR/background/network availability-gated access, and action-at-item-end. |
| `AVPlayerItem` | `swift-bridge/Sources/AVPlayerBridge/PlayerItem.swift` | `src/player.rs`, `src/player_item.rs` | `examples/05_avplayer_item.rs` | `tests/avplayer_item.rs` | Observation (status, size, time-jumped, failed-to-end, recommended-live-offset), buffering/bit-rate/resolution preferences, variant preferences, protected-content authorization status, and custom compositor info. |
| `AVPlayerLayer` | `swift-bridge/Sources/AVPlayerBridge/PlayerLayer.swift` | `src/player_layer.rs` | `examples/06_avplayer_layer.rs` | `tests/avplayer_layer.rs` | Layer/player attachment, gravity, video rect, displayed pixel buffer. |
| `AVQueuePlayer` | `swift-bridge/Sources/AVPlayerBridge/QueuePlayer.swift` | `src/queue_player.rs` | `examples/07_avqueue_player.rs` | `tests/avqueue_player.rs` | Queue mutation, item enumeration, action-at-item-end. |
| `AVPlayerLooper` | `swift-bridge/Sources/AVPlayerBridge/PlayerLooper.swift` | `src/player_looper.rs` | `examples/08_avplayer_looper.rs` | `tests/avplayer_looper.rs` | Loop creation, status, loop count, looping items, disable looping. |
| `AVAsset` | `swift-bridge/Sources/AVPlayerBridge/Asset.swift`, `swift-bridge/Sources/AVPlayerBridge/AssetExtras.swift` | `src/asset.rs`, `src/asset_extras.rs` | `examples/02_avasset.rs` | `tests/avasset.rs` | Duration, metadata, tracks, async key loading, preferred rate/volume, fragment/playability flags, chapter locales, and expanded track properties. |
| `AVURLAsset` | `swift-bridge/Sources/AVPlayerBridge/UrlAsset.swift`, `swift-bridge/Sources/AVPlayerBridge/FragmentedAsset.swift` | `src/asset.rs`, `src/fragmented_asset.rs` | `examples/03_avurlasset.rs` | `tests/avurlasset.rs`, `tests/avfragmented_asset.rs` | File/remote URL creation plus `UrlAssetOptions`, media-extension inspection, and fragmented-asset subclass support. |
| `AVMetadataGroup` family | `swift-bridge/Sources/AVPlayerBridge/FoundationObjects.swift`, `swift-bridge/Sources/AVPlayerBridge/MetadataGroups.swift` | `src/metadata_groups.rs` | — | `tests/avmetadata_groups.rs` | `AVMetadataGroup`, timed/date-range metadata groups, mutable variants, `AVMutableMetadataItem`, and `AVMetadataItemFilter`. |
| `AVMediaSelection` family | `swift-bridge/Sources/AVPlayerBridge/MediaSelection.swift` | `src/media_selection.rs` | — | `tests/avmedia_selection.rs` | Preferred/all media selections, groups, options, mutable copies, and availability-guarded presentation/custom-scheme access. |
| `AVAssetVariant` family | `swift-bridge/Sources/AVPlayerBridge/AssetVariant.swift` | `src/asset_variant.rs` | — | `tests/avasset_variant.rs` | Asset-variant enumeration plus nested video/audio attribute wrappers and `AVAssetVariantQualifier`. |
| `AVFragmentedAsset` family | `swift-bridge/Sources/AVPlayerBridge/FragmentedAsset.swift` | `src/fragmented_asset.rs` | — | `tests/avfragmented_asset.rs` | `AVFragmentedAsset`, `AVFragmentedAssetTrack`, `AVFragmentedAssetMinder`, and `AVMediaExtensionProperties`. |
| `AVPlayerItemAccessLog` | `swift-bridge/Sources/AVPlayerBridge/PlayerItemLogs.swift` | `src/player_item_access_log.rs` | `examples/09_avplayer_item_access_log.rs` | `tests/avplayer_item_access_log.rs` | Access-log presence, extended log, event decoding. |
| `AVPlayerItemErrorLog` | `swift-bridge/Sources/AVPlayerBridge/PlayerItemLogs.swift` | `src/player_item_error_log.rs` | `examples/10_avplayer_item_error_log.rs` | `tests/avplayer_item_error_log.rs` | Error-log presence, extended log, event decoding. |
| `AVPlayerItemOutput` | `swift-bridge/Sources/AVPlayerBridge/PlayerItemOutputs.swift`, `swift-bridge/Sources/AVPlayerBridge/PlayerItemOutputObservers.swift` | `src/player_item_output.rs`, `src/player_item_video_output.rs`, `src/player_item_metadata_output.rs`, `src/player_item_legible_output.rs` | `examples/11_avplayer_item_metadata_output.rs`, `examples/12_avplayer_item_video_output.rs`, `examples/13_avplayer_item_legible_output.rs` | `tests/avplayer_item_metadata_output.rs`, `tests/avplayer_item_video_output.rs`, `tests/avplayer_item_legible_output.rs` | Abstract base-output timing/suppression helpers plus delegate observation for video, metadata, and legible outputs. |
| `AVPlayerItemMetadataOutput` | `swift-bridge/Sources/AVPlayerBridge/PlayerItemOutputs.swift`, `PlayerItemOutputObservers.swift` | `src/player_item_metadata_output.rs` | `examples/11_avplayer_item_metadata_output.rs` | `tests/avplayer_item_metadata_output.rs` | Output construction, attach/detach, identifiers, advance interval, delegate observation, and base-output access. |
| `AVPlayerItemVideoOutput` | `swift-bridge/Sources/AVPlayerBridge/PlayerItemOutputs.swift`, `PlayerItemOutputObservers.swift` | `src/player_item_video_output.rs` | `examples/12_avplayer_item_video_output.rs` | `tests/avplayer_item_video_output.rs` | Output construction, attach/detach, suppresses-player-rendering, delegate observation, base-output timing, and pixel-buffer queries. |
| `AVPlayerItemLegibleOutput` | `swift-bridge/Sources/AVPlayerBridge/PlayerItemOutputs.swift`, `PlayerItemOutputObservers.swift` | `src/player_item_legible_output.rs` | `examples/13_avplayer_item_legible_output.rs` | `tests/avplayer_item_legible_output.rs` | Output construction, attach/detach, native subtype filtering, delegate observation, text-styling resolution, and base-output access. |
| `AVPlayerItemTrack` | `swift-bridge/Sources/AVPlayerBridge/PlayerItemTrack.swift`, `PlayerItem.swift` | `src/player_item_track.rs` | `examples/14_avplayer_item_track.rs` | `tests/avplayer_item_track.rs` | Availability depends on AVFoundation materialization; examples/tests handle zero-track cases on synthesized AIFFs and expose typed video-field-mode access. |
| `AVPlayerMediaSelectionCriteria` | `swift-bridge/Sources/AVPlayerBridge/PlayerMediaSelectionCriteria.swift` | `src/player_media_selection_criteria.rs` | `examples/15_avplayer_media_selection_criteria.rs` | `tests/avplayer_media_selection_criteria.rs` | Preferred languages, preferred/principal characteristics, per-player application, and typed waiting/rate/background/network helpers. |
| `AVPlayerVideoOutput` | `swift-bridge/Sources/AVPlayerBridge/PlayerVideoOutput.swift` | `src/player_video_output.rs` | `examples/16_avplayer_video_output.rs` | `tests/avplayer_video_output.rs` | Tag-collection presets, output specification/configuration, player attachment, tagged-buffer inspection. |
| `AVPlayerItemRenderedLegibleOutput` | `swift-bridge/Sources/AVPlayerBridge/PlayerItemRenderedLegibleOutput.swift` | `src/player_item_rendered_legible_output.rs` | `examples/17_avplayer_item_rendered_legible_output.rs` | `tests/avplayer_item_rendered_legible_output.rs` | Rendered caption image metadata, delegate callbacks, attach/detach, video-display sizing. |
| `AVPlayerItemMetadataCollector` / `AVPlayerItemMediaDataCollector` | `swift-bridge/Sources/AVPlayerBridge/PlayerItemMetadataCollector.swift` | `src/player_item_metadata_collector.rs`, `src/player_item_media_data_collector.rs` | `examples/18_avplayer_item_metadata_collector.rs` | `tests/avplayer_item_metadata_collector.rs` | Collector construction, delegate callbacks, add/remove on items, collector-kind introspection, and borrowed base-collector access. |
| `AVPlayerInterstitialEventController` / `AVPlayerInterstitialEventMonitor` | `swift-bridge/Sources/AVPlayerBridge/PlayerInterstitial.swift` | `src/player_interstitial_event.rs` | `examples/19_avplayer_interstitial_event.rs` | `tests/avplayer_interstitial_event.rs` | Interstitial event creation, controller scheduling, monitor state/notifications, and waiting-reason access. |
| `AVPlayerItemIntegratedTimeline` | `swift-bridge/Sources/AVPlayerBridge/PlayerItemIntegratedTimeline.swift` | `src/player_item_integrated_timeline.rs` | `examples/20_avplayer_item_integrated_timeline.rs` | `tests/avplayer_item_integrated_timeline.rs` | Current snapshot/segment inspection, periodic/boundary observers, out-of-sync notifications, seek helpers, and `PlayerItemSegment` re-exports for the timeline segment type. |
| `AVAssetReader` expansion | `swift-bridge/Sources/AVPlayerBridge/Reader.swift`, `swift-bridge/Sources/AVPlayerBridge/ReaderExtras.swift` | `src/reader.rs`, `src/reader_extras.rs` | — | `tests/avreader_extras.rs` | Base `AVAssetReaderOutput` access, random-access helpers, sample-reference outputs, metadata adaptors, and caption adaptor/validation bridges. |
| `AVSampleBufferDisplayLayer` | `swift-bridge/Sources/AVPlayerBridge/SampleBufferDisplayLayer.swift` | `src/sample_buffer_display_layer.rs` | — | `tests/avsample_buffer_display_layer.rs` | Queued-sample-buffer rendering status/error inspection, gravity and playback-prevention flags, enqueue, flush, and stop-requesting-media-data control. |

`COVERAGE_AUDIT.md` remains the authoritative table for the original 109-symbol playback-only audit; this matrix documents the additional 0.4.0 AVFoundation families wrapped beyond that narrower top-level set.
