Skip to content

Commit

Permalink
Merge pull request #3162 from Orange-OpenSource/typeScriptBugFix
Browse files Browse the repository at this point in the history
Remove default value in typeScript
  • Loading branch information
dsilhavy authored Jan 17, 2020
2 parents 8d8add5 + ac01b62 commit eab99e0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ declare namespace dashjs {
clearkeys?: { [key: string]: string };

/** Priority level of the key system to be selected (0 is the highest prority, -1 for undefined priority) */
priority?: number = -1;
priority?: number;
}

export interface KeySystem {
Expand Down
14 changes: 13 additions & 1 deletion src/streaming/protection/vo/ProtectionData.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ class ProtectionData {
* @param {Object} clearkeys defines a set of clear keys that are available to
* the key system. Object properties are base64-encoded keyIDs (with no padding).
* Corresponding property values are keys, base64-encoded (no padding).
* @param {number|undefined} priority priority order of the current ProtectionData
* @class
*/
constructor(serverURL, httpRequestHeaders, clearkeys) {
constructor(serverURL, httpRequestHeaders, clearkeys, priority) {
this.serverURL = serverURL;
this.httpRequestHeaders = httpRequestHeaders;
this.clearkeys = clearkeys;
this.priority = priority === undefined ? -1 : priority;
}
}

Expand Down Expand Up @@ -87,4 +89,14 @@ class ProtectionData {
* @memberof ProtectionData
*/

/**
* priority
*
* @instance
* @type Object
* @name ProtectionData.priority
* @readonly
* @memberof ProtectionData
*/

export default ProtectionData;

0 comments on commit eab99e0

Please sign in to comment.