Bug 165052 - Delay in response to encryption events while paused causes MEDIA_DECODE_ERROR
Summary: Delay in response to encryption events while paused causes MEDIA_DECODE_ERROR
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 10
Hardware: Mac macOS 10.12
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-11-23 14:12 PST by Aaron Boushley
Modified: 2016-12-01 12:37 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Boushley 2016-11-23 14:12:30 PST
Reproduction Steps:
1. Start playback of a video that has FairPlay DRM.
2. Pause the video (doesn't matter if video has actually begun playback or not)
3. Switch tabs (or focus other applications), this causes a webkitneedkey event to be fired
4. Wait 10-15 seconds after this webkitneedkey event (keeping the video tab in focus)

Expected Results:
Nothing happens. The video element is able to sit idle without responses to encryption/needkey as long as it remains paused. This was the behavior on OSX 10.11.

Actual Results:
On macOS 10.12 a Media Error with Code 3 (MEDIA_ERR_DECODE) is fired.

A simplified version of this error can be seen here: https://jsfiddle.net/boushley/uprzdx1o/

In our real use case we are waiting for the user to actively click play before handling some session setup that is needed to have successful license requests. For this reason we end up with delays that are long enough to trigger this error behavior when the user re-focuses the browser, but doesn't click play.
Comment 1 Radar WebKit Bug Importer 2016-12-01 12:37:33 PST
<rdar://problem/29464650>