hls.js
hls.js copied to clipboard
Session Persist Need for EME feature
Is your feature request related to a problem? Please describe.
Recently we are trying to cache the keysession and avoid the repeated request of license URL. We found it has some definition about persist the keysession in w3c standard and it even has a example in Chapter 8.5.
https://www.w3.org/TR/2014/WD-encrypted-media-20140828/encrypted-media.html#examples
We found hls.js(the version we are using is 0.10.x) has drmSystemOptions.sessionTypes to support this feature. But it seems not been implement after I read the code and it did not take effect after I set sessionTypes to persist.
I read the new code of version 1.0.9 and I found sessionTypes has been removed.
Is there any possibility to add it back and support this feature in a future version?
Describe the solution you'd like
I think the example of W3C standard is good enough. You can refer to Chapter8.5 Stored License
https://www.w3.org/TR/2014/WD-encrypted-media-20140828/encrypted-media.html#examples
Additional context
No response
I read the new code of version 1.0.9 and I found sessionTypes has been removed.
Can you point out where? A reference to the commit or PR where it was removed would be helpful for context.
Currently drmSystemOptions only supports robustness options:
export type DRMSystemOptions = {
audioRobustness?: string;
videoRobustness?: string;
};
Please provide an example of how your app would use this change in this issue or in a PR that resolves this issue. It sounds like a relatively small change to have a default session type option of "temporary" that could be overwritten with a value of "persistent".
@robwalch https://github.com/video-dev/hls.js/commit/5b3e4e69646febe77a74fbc8149d855deb1cd751#diff-1cb8b36ed42a658ab63ac970ab1bd648d67f9b199f95fd279f8a50c8d51df2a6R30 I think if @Wenjie-Shao had support it was with a custom implementation that someone had patched on their side, the original EME controller code seems to have been always commented out, and never read.
This issue will be addressed by #4930 which extends drmSystemOptions to include configuration of sessionTypes:
https://github.com/video-dev/hls.js/pull/4930/files#diff-ee0e7c2a948dbbcfe6a32c326685df6c199f205cac6da2cff703dc3e9a93b7d7R316-R319
This is available in v1.3.0-beta.1.