Bug 262874
Summary: | Legacy EME WebKitMediaKeys createSessions unknown error | ||
---|---|---|---|
Product: | WebKit | Reporter: | Geraint <geraint.fisher> |
Component: | Web Audio | Assignee: | Eric Carlson <eric.carlson> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | cdumez, eric.carlson, jer.noble, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 16 | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Geraint
We are using a legacy implementation of FairPlay EME. When switching tracks to a previously played track in Safari we get WebKitMediaKeyError with code = 1 systemCode = 0.
Reproduction steps:
- Open Safari on macOS.
- Go to open.spotify.com
- Login with a Spotify account.
- Play any song or playlist.
- Use the Skip Forward and Skip Backwards buttons to go forwards and backwards alternately
(The buttons to the left & right of the play/pause button).
- After a few times going back and forth the error will occur.
A visible "Spotify can't play this right now." message will appear and an "Unhandled Promise Rejection: EMEError: MediaKeySession Safari Error" message will appear in the javascript console.
We create new WebKitMediaKeys, set the media keys via HTMLMediaElement.webkitSetMediaKeys, then call WebKitMediaKeys.createSession. We then wait the key added event but the key error event is fired instead.
Observations:
- It is not track specific, a track can play fine then can error out when coming back to it.
- It doesn't occur when attempting to play a track the first time.
- We have tried creating a new HTMLMediaElement & new media keys between tracks and we still get the error.
- Does not affect iOS. This works in Safari 14 macOS but not 16/17.
- Whether createSession is successful or not we call it (and WebKitMedia) with the same arguments
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/116689080>
Eric Carlson
Pull request: https://github.com/WebKit/WebKit/pull/25333
EWS
Committed 275647@main (cac2e6433cf3): <https://commits.webkit.org/275647@main>
Reviewed commits have been landed. Closing PR #25333 and removing active labels.