w3c / encrypted-media

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

Fail playback after long waitingforkey #484

Open xhwang-chromium opened 3 years ago

xhwang-chromium commented 3 years ago

According to the current spec, when playback is blocked waiting for a key, a waitingforkey event will be fired on the media element. However, from my experience, a lot of JS players don't handle this event. Since there are not error on the media element, the playback will simply stall. This often leads to bad user experiences: users will only see hanging pages without clear signal on what's happening.

I propose that we change the spec such that after waitingforkey for long enough (e.g. 30 seconds), if the playback doesn't resume, we trigger an error on the media element, so even if the JS player doesn't handle the waitingforkey event, user will get a clearer signal on the issue.

joeyparrish commented 1 year ago

I think it could be difficult to define a fixed interval for that. But in general, if an application isn't addressing this event, it's reasonable to fail playback at some point.

joeyparrish commented 1 year ago

Moving to v3 to give the community time to comment. If there's any desire for this, let us know. For now, we're kicking this out of the v2 milestone.