We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d51c7ac commit 8df5545Copy full SHA for 8df5545
lib/drm/drm_engine.js
@@ -809,15 +809,9 @@ shaka.drm.DrmEngine = class {
809
* @param {!shaka.extern.DrmInfo} drmInfo
810
*/
811
updateCurrentDrmInfo(drmInfo) {
812
- if (this.currentDrmInfo_) {
813
- const mediaTypesEmpty =
814
- !this.currentDrmInfo_.mediaTypes && drmInfo.mediaTypes;
815
- const mediaTypesChanged =
816
- this.currentDrmInfo_.mediaTypes &&
817
- this.currentDrmInfo_.mediaTypes !== drmInfo.mediaTypes;
818
- if (mediaTypesEmpty || mediaTypesChanged) {
819
- this.currentDrmInfo_.mediaTypes = drmInfo.mediaTypes;
820
- }
+ if (this.currentDrmInfo_ &&
+ (this.currentDrmInfo_.mediaTypes !== drmInfo.mediaTypes)) {
+ this.currentDrmInfo_.mediaTypes = drmInfo.mediaTypes;
821
}
822
823
0 commit comments