Skip to content

Commit 5f7f307

Browse files
committed
Add missing information about errorSettings to index.d.ts and Settings.js
1 parent b26a5b8 commit 5f7f307

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

index.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,11 @@ declare namespace dashjs {
317317
rtpSafetyFactor?: number,
318318
mode?: 'query' | 'header'
319319
}
320+
};
321+
errors?: {
322+
recoverAttempts?: {
323+
mediaErrorDecode?: number
324+
}
320325
}
321326
}
322327

src/core/Settings.js

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,15 @@ import {HTTPRequest} from '../streaming/vo/metrics/HTTPRequest';
4444
* @typedef {Object} PlayerSettings
4545
* @property {module:Settings~DebugSettings} [debug]
4646
* Debug related settings.
47+
* @property {module:Settings~ErrorSettings} [errors]
48+
* Error related settings
4749
* @property {module:Settings~StreamingSettings} [streaming]
4850
* Streaming related settings.
4951
* @example
5052
*
5153
* // Full settings object
5254
* settings = {
53-
* debug: {
55+
* debug: {
5456
* logLevel: Debug.LOG_LEVEL_WARNING,
5557
* dispatchEvent: false
5658
* },
@@ -196,7 +198,12 @@ import {HTTPRequest} from '../streaming/vo/metrics/HTTPRequest';
196198
* rtpSafetyFactor: 5,
197199
* mode: Constants.CMCD_MODE_QUERY
198200
* }
199-
* }
201+
* },
202+
* errors: {
203+
* recoverAttempts: {
204+
* mediaErrorDecode: 5
205+
* }
206+
* }
200207
* }
201208
*/
202209

@@ -326,6 +333,14 @@ import {HTTPRequest} from '../streaming/vo/metrics/HTTPRequest';
326333
* Note this will be dispatched regardless of log level.
327334
*/
328335

336+
/**
337+
* @typedef {Object} module:Settings~ErrorSettings
338+
* @property {object} [recoverAttempts={mediaErrorDecode: 5}]
339+
* Defines the maximum number of recover attempts for specific media errors.
340+
*
341+
* For mediaErrorDecode the player will reset the MSE and skip the blacklisted segment that caused the decode error. The resulting gap will be handled by the GapController.
342+
*/
343+
329344
/**
330345
* @typedef {Object} CachingInfoSettings
331346
* @property {boolean} [enable]

0 commit comments

Comments
 (0)