Bug 262874

Summary: Legacy EME WebKitMediaKeys createSessions unknown error
Product: WebKit Reporter: Geraint <geraint.fisher>
Component: Web AudioAssignee: 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
Reported 2023-10-09 01:56:28 PDT
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
Radar WebKit Bug Importer
Comment 1 2023-10-09 10:58:49 PDT
Eric Carlson
Comment 2 2024-02-29 18:42:23 PST
EWS
Comment 3 2024-03-04 12:46:52 PST
Committed 275647@main (cac2e6433cf3): <https://commits.webkit.org/275647@main> Reviewed commits have been landed. Closing PR #25333 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.