Skip to content

Commit

Permalink
Fix return value for drmInfo() with src=
Browse files Browse the repository at this point in the history
This shouldn't depend on the load state.

Issue #382

Change-Id: Ia601c79404e074ec080c923f239533a8d04f6e64
  • Loading branch information
joeyparrish committed Apr 25, 2019
1 parent 893c7bd commit c7ea9a9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -2608,16 +2608,14 @@ shaka.Player.prototype.keySystem = function() {

/**
* Get the drm info used to initialize EME. If EME is not being used, this will
* return |null|. If the player has not loaded content or is still loading
* content, this will return |null|.
* return |null|. If the player is idle or has not initialized EME yet, this
* will return |null|.
*
* @return {?shaka.extern.DrmInfo}
* @export
*/
shaka.Player.prototype.drmInfo = function() {
return this.loadMode_ == shaka.Player.LoadMode.MEDIA_SOURCE ?
this.drmEngine_.getDrmInfo() :
null;
return this.drmEngine_ ? this.drmEngine_.getDrmInfo() : null;
};


Expand Down

0 comments on commit c7ea9a9

Please sign in to comment.