Open mutaben opened 1 month ago
Thanks for the suggestion. We could namely add a few words about chapter support in Pillarbox documentation. Let me just briefly provide you with pointers until we have more documentation available.
A few words about terminology first, as we moved from an SRG SSR internal terminology with Letterbox (chapters and segments) to a more standard one (chapters only) with Pillarbox:
A Pillarbox Player
is loaded with PlayerItem
s, whose main purpose is to implement Asset
delivery. An asset ultimately provides the URL of the content being played, alongside metadata. Standard metadata is exposed by Player
through its metadata
property. This property is automatically published by a Player
, which means SwiftUI views can directly respond to metadata retrieval and adjust their layout accordingly.
Metadata is provided as PlayerMetadata
. It most notably contains title, description and artworks for the content itself, and possibly a chapter list if available.
Our Core Business package provides PlayerItem
s suitable for playing our content. If chapters are available they are automatically loaded and provided in updates published by a Player
instance.
Displaying chapters is therefore extremely easy in a custom iOS layout:
metadata
property when building your layout.LazyImage
to load images (we namely avoid loading images if they are not used).Chapter
directly.The rest is entirely up to you. You can decide to display a chapter list horizontally or vertically, as a lateral or bottom pane, with or without images. Your creativity is the limit. See our ChapterList
demo implementation for an example of integration.
A final remark. As said above the tvOS system UI has native support for chapters. On this platform no additional work is required, provided metadata associated with an asset contains chapters of course.
Use case description
I would like to have more information on integrating chapters and segmented videos aspects with a Pillarbox player please.
Thank you in advance.
Acceptance criteria
No response
Proposed solution
No response
Alternatives considered
No response
Is there an existing similar feature request?
[X] I have searched existing features and found no similar request.
[X] I have browsed the available API and found no way to achieve the use case I described.