Skip to content

Feature request: I-frame playlist on the native loopback-HLS route, so AVPlayerViewController's built-in scrub-thumbnail support works for hosts using the stock system transport bar #682

Description

@akacores

What should the engine do?

Context

scrubThumbnail(atSeconds:maxWidth:) / supportsCacheBackedStills (#106, #605, #544) already solve
on-demand scrub previews for hosts that render their own custom transport bar on top of
AetherPlayerSurface/AetherPlayerView. That's working great for us on the software-decode route.

We'd also like scrub thumbnails on the native route, where the host just hands the session to a
stock AVPlayerViewController and lets its system transport bar do the rest (no custom UI). Apple
documents that AVPlayerViewController's scrub bar shows thumbnails automatically, with zero host
code, when the HLS playlist it's playing includes an I-frame-only rendition
(#EXT-X-I-FRAME-STREAM-INF, Apple's "Trick Play track") — this is a built-in system feature, not
something AVPlayerViewController exposes as a pluggable hook.

On the native route, AVPlayerViewController isn't pointed at the original origin URL — it's pointed
at the engine's own loopback-served HLS (the local HLSVideoEngine/SegmentCache server that remuxes
the source, e.g. a debrid/torrent MKV, into fMP4 segments). I checked the current source + changelog
through 7.25.0: the only existing I-frame-related code (RemoteHLSMasterRewrite.swift) preserves an
EXT-X-I-FRAME-STREAM-INF tag when the origin already ships one (a real CDN HLS source) — the
loopback server doesn't generate one itself for a remuxed VOD session, so AVPlayerViewController's
automatic trickplay UI never activates for exactly the sources scrubThumbnail was built for
(debrid/torrent direct links, old containers, etc.).

Ask

Would it be feasible for the native-route loopback HLS output (VOD sessions backed by SegmentCache)
to also emit a low-res I-frame-only rendition — reusing the same keyframe-to-target decode path
scrubThumbnail's native arm already has — referenced via EXT-X-I-FRAME-STREAM-INF in the master
playlist it serves to AVPlayerViewController?

This would be purely additive/opt-in (e.g. behind a LoadOptions flag if there's a cost concern for
hosts that don't need it): hosts already using a custom transport bar keep calling scrubThumbnail
directly as today; hosts using the stock AVPlayerViewController UI would get Apple's own native
scrub-thumbnail experience for free, with no custom UI work on the host side at all.

Happy to share more detail on our specific use case (tvOS, debrid-resolved MKV, native route) if
useful.

Motivating media or use case

Plays debrid/torrent-resolved direct links (H.264/HEVC in MKV) through the native
route — AetherEngine's loopback HLS server feeds a stock AVPlayerViewController. Scrubbing in the
system transport bar shows no thumbnail at all today, since the master playlist it serves has no
EXT-X-I-FRAME-STREAM-INF rendition. This isn't tied to one specific file — any VOD session on the
native route reproduces it, since the loopback HLS output never includes an I-frame rendition
regardless of source.

Area

Public API surface

Host app / integration context

A personal tvOS client playing debrid-resolved direct links (mostly MKV) via the native AVPlayer route.

Would you be willing to open a PR?

No

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions