SRGSSR / pillarbox-apple

A next-generation reactive media playback ecosystem for Apple platforms.
https://testflight.apple.com/join/TS6ngLqf
MIT License
60 stars 9 forks source link

Remove playlist source support #1041

Closed defagos closed 1 month ago

defagos commented 1 month ago

Description

This PR reverts API changes introduced in version 3.0.0 of Pillarbox (as well as a minor subsequent change introduced in 4.0.0).

We attempted to make it easier to implement playlist view models based on business model objects by adding a source parameter to PlayerItem. Usage revealed that this does not make the task any easier than it was:

For this reason we reverted most of recent changes made to support sources at the PlayerItem level. Some good changes, e.g. a more item-based API (instead of sometimes being index-based) and demo simplifications (template removal, mostly) have been retained.

This means apps will be responsible of implementing playlist view models involving business model objects, which was still required with Pillarbox 3.0.0 anyway. To make it easier to sync with current player item updates this PR also makes currentItem a published property.

Changes made

Checklist