SRGSSR / pillarbox-apple

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

Blocked content handling PoC #840

Closed defagos closed 3 weeks ago

defagos commented 3 weeks ago

As an editor I don't want users to be able to see content that I decided should be blocked (legal, commercial, geoblocking). As a developer I would like to have an implementation strategy that matches business needs.

Acceptance criteria

Hints

Remark

We might have issues with standalone mode and geoblocking. In the following example, no blocked segments are returned for the full-length, which makes the content incorrectly playable. This should be reported to the backend team (Letterbox and Pillarbox players are all affected).

Tasks

defagos commented 3 weeks ago

We implemented two PoCs with various tradeoffs. In the two cases we first extracted segments for the current chapter in the media composition.

First PoC: Player item tracker

We can use a PlayerItemTracker implementing a periodic time publisher to detect when a forbidden time range is reached.

Pros

Cons

Remaining work

Second PoC: Support in player metadata

We can add forbidden time ranges to PlayerMetadata. This way we can observe time to detect when forbidden ranges are entered. Moreover we can have seeks directly prevent target times in forbidden ranges. For a better result the forbidden ranges must be provided to the QueuePlayer so that low-level seeks, no matter where they are made from, prevent access to forbidden regions.

Pros

Cons

Strategy

We should likely discuss these two PoCs in a review involving business and packaging people:

In parallel we should have the packaging teams work on trimming blocked intervals from streams. When done we will then be able to remove the related code entirely.

defagos commented 3 weeks ago

After investigating how #845 could be implemented it appears that the second strategy offers a common formalism to handle credits as well as blocked intervals.

For this reason the business discussion about briefly seen forbidden frames is irrelevant. Still remains the discussion about how packaging could avoid forbidden images to be delivered entirely.