You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a developer integrating Pillarbox I need a simple UI component (without any view) to help me keep playlist model objects from my app with the player item playlist managed by a player.
Acceptance criteria
A UI component is provided to help manage playlist sync.
The UI component is used in the current playlist demo.
Tasks
Replace currentIndex API with currentItem API to be able to bind a Player to a List directly.
Update playlist demo implementation.
Get rid of Template demo stuff if possible.
Provide List convenience constructor with a player parameter?
The text was updated successfully, but these errors were encountered:
There is likely no need for any playlist component. We can rather bind Player directly to a List. This requires:
PlayerItem must be Hashable.
currentItem should be bindable to a List.
The only remaining question is how we can make it easy for a list of model objects to be kept in sync with the list of PlayerItems. Probably making PlayerItem conform to Identifiable is the easiest way. When loading content into the player an app can storet the id - model object relationship to retrieve it later.
No need to conform to Identifiable, and in fact it would make the API more error-prone to use when connected to a List. List namely supports identifiable types and expects that the selection state stores associated identifiers. In our case we want to work with items, both for the list of items as well as for the selection. In such cases it suffices to use \.self as id when creating the List to get the desired behavior, and this is enforced by making PlayerItemnotIdentifiable. Otherwise the code would compile but no selection would be made, as the type of currentItem and of the identifier, naturally UUID for PlayerItem, would not match.
As a developer integrating Pillarbox I need a simple UI component (without any view) to help me keep playlist model objects from my app with the player item playlist managed by a player.
Acceptance criteria
Tasks
currentIndex
API withcurrentItem
API to be able to bind aPlayer
to aList
directly.Template
demo stuff if possible.List
convenience constructor with a player parameter?The text was updated successfully, but these errors were encountered: