Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: DrmEngine exception thrown when using FairPlay (#4971)
Closes #4902 This is not intended to be a complete fix for the issue, I do not understand the effect this new ternary on the shaka player as a whole. I have not found the root cause for `this.currentDrmInfo_` being `undefined` when accessed. It does, however, look like it has previously been acceptable for this property to be `undefined`. During the work to add Fairplay support in 2022, accessing `this.currentDrmInfo_` was added on line 483. This line **does not** accept that `this.currentDrmInfo_` can be undefined. A few lines below this, `this.createOrLoad()` is called, which **does** accept that `this.currentDrmInfo_` can be `undefined`. The latter piece of code was last modified in 2019. https://github.com/shaka-project/shaka-player/blob/c471d23bc25db11dda85a18870ebd3fe37971848/lib/media/drm_engine.js#L483-L498 https://github.com/shaka-project/shaka-player/blob/c471d23bc25db11dda85a18870ebd3fe37971848/lib/media/drm_engine.js#L626-L629
- Loading branch information