Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLS FairPlay encrypted video plays on iOS 14 + safari 14.0, but fails with error code 3016 in macOS Catalina + Safari 14.0 #3073

Closed
shashidharc27 opened this issue Dec 30, 2020 · 2 comments
Labels
status: archived Archived and locked; will not be updated status: duplicate A duplicate of another issue; should be closed after linking to the original issue

Comments

@shashidharc27
Copy link

Hi,

We have created a HLS FairPlay encrypted video using Shaka-packager. The video plays every time on iOS 14 + Safari 14.0, but playback fails with error code 3016 on macOS Catalina + Safari 14.0.

Note: Playback of the same HLS unencrypted video is successful on macOS Catalina + Safari 14.0.

  • [Error] Error code – 3016 – "object" – {severity: 2, category: 3, code: 3016, …}
    {severity: 2, category: 3, code: 3016, data: [3, undefined, undefined], handled: false, …}Object
    onError (player.html:213)
    onErrorEvent (player.html:208)
    (anonymous function) (shaka-player.compiled.debug.js:227:387)
    (anonymous function) (shaka-player.compiled.debug.js:912:250)
    (anonymous function) (shaka-player.compiled.debug.js:914:100)
    (anonymous function) (shaka-player.compiled.debug.js:785:331)

Link to manifest

https://github.com/shashidharc27/shaka-player/blob/master/hls.m3u8
https://github.com/shashidharc27/shaka-player/blob/master/stream_0.m3u8
https://github.com/shashidharc27/shaka-player/blob/master/stream_1.m3u8

Log from macOS Catalina + Safari 14.0:

[Log] skdUri is: – "skd://ZjNjNWUwMzYxZTY2NTRiMjhmODA0OWM3NzhiMjM5NDY=" (player.html, line 169)
[Log] keyid is: – "ZjNjNWUwMzYxZTY2NTRiMjhmODA0OWM3NzhiMjM5NDY=" (player.html, line 171)
[Log] new keyid: – "ZjNjNWUwMzYxZTY2NTRiMjhmODA0OWM3NzhiMjM5NDY=" (player.html, line 173)
[Log] Unable to find byte-order-mark, making an educated guess. (shaka-player.compiled.debug.js, line 193)
[Log] PatchedMediaKeysApple.MediaKeySession.generateRequest (shaka-player.compiled.debug.js, line 1613)
[Log] Ignoring duplicate init data. (shaka-player.compiled.debug.js, line 281)
[Log] PatchedMediaKeysApple.onWebkitKeyMessage_ – WebKitMediaKeyMessageEvent {isTrusted: true, message: Uint8Array, destinationURL: "", …} (shaka-player.compiled.debug.js, line 1617)
WebKitMediaKeyMessageEvent {isTrusted: true, message: Uint8Array, destinationURL: "", type: "webkitkeymessage", target: WebKitMediaKeySession, …}WebKitMediaKeyMessageEvent
[Log] cookie val: sduser (player.html, line 133)
[Log] PatchedMediaKeysApple.MediaKeySession.update (shaka-player.compiled.debug.js, line 1615)
[Log] PatchedMediaKeysApple.onWebkitKeyAdded_ – Event {isTrusted: true, type: "webkitkeyadded", target: WebKitMediaKeySession, …} (shaka-player.compiled.debug.js, line 1618)
Event {isTrusted: true, type: "webkitkeyadded", target: WebKitMediaKeySession, currentTarget: WebKitMediaKeySession, eventPhase: 2, …}Event
[Log] DRM Event. getDrmInfo... (player.html, line 196)
[Log] {keySystem: "com.apple.fps.1_0", licenseServerUri: "https://samplelsp:8080/LicenseServerProxy/fps", distinctiveIdentifierRequired: false, persistentStateRequired: false, audioRobustness: "", …} (player.html, line 197)
[Log] session Ids... (player.html, line 198)
[Log] ["135c307b-55dc-4d5c-a4b2-79c813c769e9"] (1) (player.html, line 199)
[Error] Error code – 3016 – "object" – {severity: 2, category: 3, code: 3016, …}
{severity: 2, category: 3, code: 3016, data: [3, undefined, undefined], handled: false, …}Object
onError (player.html:213)
onErrorEvent (player.html:208)
(anonymous function) (shaka-player.compiled.debug.js:227:387)
(anonymous function) (shaka-player.compiled.debug.js:912:250)
(anonymous function) (shaka-player.compiled.debug.js:914:100)
(anonymous function) (shaka-player.compiled.debug.js:785:331)

Log from iOS 14 + Safari 14.0

[Log] skdUri is: – "skd://ZjNjNWUwMzYxZTY2NTRiMjhmODA0OWM3NzhiMjM5NDY=" (player.html, line 169)
[Log] keyid is: – "ZjNjNWUwMzYxZTY2NTRiMjhmODA0OWM3NzhiMjM5NDY=" (player.html, line 171)
[Log] new keyid: – "ZjNjNWUwMzYxZTY2NTRiMjhmODA0OWM3NzhiMjM5NDY=" (player.html, line 173)
[Log] Unable to find byte-order-mark, making an educated guess. (shaka-player.compiled.debug.js, line 193)
[Log] PatchedMediaKeysApple.MediaKeySession.generateRequest (shaka-player.compiled.debug.js, line 1613)
[Log] Ignoring duplicate init data. (shaka-player.compiled.debug.js, line 281)
[Log] PatchedMediaKeysApple.onWebkitKeyMessage_ – WebKitMediaKeyMessageEvent {isTrusted: true, message: Uint8Array, destinationURL: "", …} (shaka-player.compiled.debug.js, line 1617)
WebKitMediaKeyMessageEvent {isTrusted: true, message: Uint8Array, destinationURL: "", type: "webkitkeymessage", target: WebKitMediaKeySession, …}WebKitMediaKeyMessageEvent
[Log] cookie val: sduser (player.html, line 133)
[Log] PatchedMediaKeysApple.MediaKeySession.update (shaka-player.compiled.debug.js, line 1615)
[Log] PatchedMediaKeysApple.onWebkitKeyAdded_ – Event {isTrusted: true, type: "webkitkeyadded", target: WebKitMediaKeySession, …} (shaka-player.compiled.debug.js, line 1618)
Event {isTrusted: true, type: "webkitkeyadded", target: WebKitMediaKeySession, currentTarget: WebKitMediaKeySession, eventPhase: 2, …}Event
[Log] DRM Event. getDrmInfo... (player.html, line 196)
[Log] {keySystem: "com.apple.fps.1_0", licenseServerUri: "https://samplelsp:8080/LicenseServerProxy/fps", distinctiveIdentifierRequired: false, persistentStateRequired: false, audioRobustness: "", …} (player.html, line 197)
[Log] session Ids... (player.html, line 198)
[Log] ["b073774a-b0a6-4043-bb03-fe2df866e688"] (1) (player.html, line 199)

For full player logs, Please refer the link below,

https://github.com/shashidharc27/shaka-player/blob/master/mac_safari.log
https://github.com/shashidharc27/shaka-player/blob/master/ios_safri.log

What can be the issue? Please let us know.

Thanks

@avelad
Copy link
Collaborator

avelad commented Jan 19, 2021

I see you are using MP4 with Fairplay. As far as I know, you need this to be implemented to work properly: #2999

@joeyparrish
Copy link
Member

I'm running tests on PR #3021 right now, which should fix this. In the meantime, I'm closing this as a duplicate of #2999, which will be solved by that PR. Thanks, @avelad, for your reply!

@joeyparrish joeyparrish added status: duplicate A duplicate of another issue; should be closed after linking to the original issue and removed needs triage labels Jan 19, 2021
@shaka-project shaka-project locked and limited conversation to collaborators Mar 20, 2021
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated status: duplicate A duplicate of another issue; should be closed after linking to the original issue
Projects
None yet
Development

No branches or pull requests

4 participants