Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reuse cache even if key system type given in API is not the same
Thanks to the PR #1478, that basically allows integration tests on our DRM logic without a real encrypted or decodable contents nor MSE/EME available, I noticed that I very recently brought a minor regression in the rewrite of the `MediaKeySystemAccess` cache reusage rules. We relied on the `keySystems[].type` API to see if the cached one was compatible to the new wanted one, we probably wanted to compare the former with the `type` actually provided as argument to the `navigator.requestMediaKeySystemAccess` API instead (e.g. `keySystems[].type` could be set just to `widevine`, in which case the RxPlayer will probably ask for `com.widevine.alpha` instead). Thankfully, EME defines a [`MediaKeySystemAccess.prototype.keySystem`](https://www.w3.org/TR/encrypted-media-2/#dom-navigator-requestmediakeysystemaccess) property that seems to (according to that recommendation) always be equal to the asked `keySystem`.
- Loading branch information