-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: Add limited support for HLS "identity" key format #4451
feat: Add limited support for HLS "identity" key format #4451
Conversation
This feature is not entirely automatic. The ClearKey CDM requires a key-id to key mapping. HLS doesn't provide a key ID anywhere. So although we could use the 'URI' attribute to fetch the actual 16-byte key, without a key ID, we can't provide this automatically to the ClearKey CDM. Instead, the application will have to use `player.configure('drm.clearKeys', { ... })` to provide the key IDs and keys or `player.configure('drm.servers.org\.w3\.clearkey', ...)` to provide a ClearKey license server URI. Closes shaka-project#2146
Incremental code coverage: 88.00% |
Really a compiler issue, since we were ever able to omit keyId in the library before
@joeyparrish Looking at the hls.js code, it looks like they make it custom (https://github.com/video-dev/hls.js/blob/master/src/demux/sample-aes.ts) . This change is fine, but it won't get much use since the key IDs won't be known in advance. On the other hand in Safari clearKey does not work correctly: https://bugs.webkit.org/show_bug.cgi?id=231006 Doubt, if we analyze the TS, could the keyID be obtained? |
I'm very hesitant to implement sample decryption in JavaScript, in particular since we are mainly concerned with DRM, and identity key format isn't any kind of realistic content protection. So I tend to feel that this is good enough given the limited usefulness of identity keys, and will let people do some pre-DRM testing in Firefox, Chrome, and Edge. And in Safari, native HLS should support this, as well, even without ClearKey, right? On the other hand, I'll admit now that nearly every time I've ever said "we shouldn't have to do X in JavaScript", we eventually reversed that decision and did it anyway. So who knows if someone will come along and make a strong case for it. For now, though, let's stick with this very simple version and see what people have to say about it. |
OK, thanks @joeyparrish |
…t#4451) This feature is not entirely automatic. The ClearKey CDM requires a key-id to key mapping. HLS doesn't provide a key ID anywhere. So although we could use the 'URI' attribute to fetch the actual 16-byte key, without a key ID, we can't provide this automatically to the ClearKey CDM. Instead, the application will have to use `player.configure('drm.clearKeys', { ... })` to provide the key IDs and keys or `player.configure('drm.servers.org\.w3\.clearkey', ...)` to provide a ClearKey license server URI. Closes shaka-project#2146
This feature is not entirely automatic.
The ClearKey CDM requires a key-id to key mapping. HLS doesn't
provide a key ID anywhere. So although we could use the 'URI'
attribute to fetch the actual 16-byte key, without a key ID, we can't
provide this automatically to the ClearKey CDM.
Instead, the application will have to use
player.configure('drm.clearKeys', { ... })
to provide the key IDsand keys or
player.configure('drm.servers.org\.w3\.clearkey', ...)
to provide a ClearKey license server URI.
Closes #2146