shaka-project / shaka-packager

A media packaging and development framework for VOD and Live DASH and HLS applications, supporting Common Encryption for Widevine and other DRM Systems.
https://shaka-project.github.io/shaka-packager/
Other
2.01k stars 511 forks source link

Local/ Downloaded encrypted videos using Shaka Packager doesn't work on iOS. #1411

Closed niravg9 closed 3 months ago

niravg9 commented 4 months ago

Version

iOS Version: 17.4.1

Issue

Online video streaming works properly but when same videos is being played locally, AVPlayer fails to play the video on iOS.

Logs

Item failed to play to the end. Error: Optional("Cannot Open"), error: Optional(Error Domain=AVFoundationErrorDomain Code=-11835 "Cannot Open" UserInfo={NSLocalizedFailureReason=This content is not authorized., NSLocalizedDescription=Cannot Open, NSUnderlyingError=0x301e15290 {Error Domain=CoreMediaErrorDomain Code=-42681 "The operation couldn’t be completed. (CoreMediaErrorDomain error -42681.)" UserInfo={NSDescription=The operation couldn’t be completed. (CoreMediaErrorDomain error -42681.)}}})

Details

It plays firsr 10 seconds of the video and throws the above error.

cosmin commented 3 months ago

This is expected, when playing this online the player will fetch a license from the license server, this isn't supported when saving locally, so it will play the clear lead portion alone and then error.