Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove default value in typeScript #3162

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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;