w3c / encrypted-media

Encrypted Media Extensions
https://w3c.github.io/encrypted-media/
Other
180 stars 80 forks source link

Update Key Statuses does not allow insight into each change #489

Closed estobbart closed 1 year ago

estobbart commented 3 years ago

The Update Key Statuses algorithm can appear like duplicate events to a player when the changes are queued up for the same event loop. For example when a key is added, its status begins as pending but can very quickly become usable. When the player responds to the event and asks the MediaKeySession for the statuses, it only sees the most recent status of usable. But the event has fired twice, causing some confusion in player code. pending to usable is one scenario, but there could be others that the player may want insight to.

joeyparrish commented 1 year ago

Players can/should batch up key statuses and let them settle before processing.