senza-sdk 4.3.5 → 4.3.7-b2908c5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +1 -1
- package/dist/bundle.js.LICENSE.txt +28 -3
- package/package.json +6 -6
- package/src/implementation/alarmManager.js +5 -5
- package/src/implementation/lifecycle.js +6 -6
- package/src/implementation/remotePlayer.js +50 -20
- package/src/implementation/senzaShakaPlayer.js +77 -47
- package/src/implementation/utils.js +0 -206
- package/src/interface/deviceManager.js +0 -1
- package/src/interface/remotePlayer.js +43 -2
- package/src/interface/version.js +1 -1
- package/dist/implementation.bundle.js +0 -2
- package/dist/implementation.bundle.js.LICENSE.txt +0 -57
|
@@ -217,6 +217,21 @@ class RemotePlayer extends EventTarget {
|
|
|
217
217
|
UNLOADING: "unloading"
|
|
218
218
|
});
|
|
219
219
|
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* @typedef {Object} AccessibilityPurposeCode
|
|
223
|
+
* @property {string} NONE
|
|
224
|
+
* @property {string} VISUALLY_IMPAIRED
|
|
225
|
+
* @property {string} HARD_OF_HEARING
|
|
226
|
+
* @property {string} SPOKEN_SUBTITLES
|
|
227
|
+
*/
|
|
228
|
+
AccessibilityPurposeCode = {
|
|
229
|
+
NONE: "",
|
|
230
|
+
VISUALLY_IMPAIRED: "1",
|
|
231
|
+
HARD_OF_HEARING: "2",
|
|
232
|
+
SPOKEN_SUBTITLES: "9"
|
|
233
|
+
};
|
|
234
|
+
|
|
220
235
|
/** get the player configuration.
|
|
221
236
|
* @returns {Config}
|
|
222
237
|
* */
|
|
@@ -328,10 +343,13 @@ class RemotePlayer extends EventTarget {
|
|
|
328
343
|
return this.LoadMode.NOT_LOADED;
|
|
329
344
|
}
|
|
330
345
|
|
|
346
|
+
|
|
331
347
|
/**
|
|
332
348
|
* @typedef {Object} TextTrack
|
|
333
349
|
* @property {string} id - A unique ID for the track
|
|
334
350
|
* @property {string} lang - The track's language
|
|
351
|
+
* @property {string[]} roles - The track's roles
|
|
352
|
+
* @property {string=} accessibilityPurpose - The track's accessibilityPurpose code
|
|
335
353
|
* @property {boolean} selected - Whether the track is selected
|
|
336
354
|
* @property {boolean} autoTranslate - (Optional) Whether the track is an auto-translated language
|
|
337
355
|
*/
|
|
@@ -353,6 +371,8 @@ class RemotePlayer extends EventTarget {
|
|
|
353
371
|
* @typedef {Object} AudioTrack
|
|
354
372
|
* @property {string} id - A unique ID for the track
|
|
355
373
|
* @property {string} lang - The track's language
|
|
374
|
+
* @property {string[]} roles - The track's roles
|
|
375
|
+
* @property {string=} accessibilityPurpose - The track's accessibilityPurpose code
|
|
356
376
|
* @property {boolean} selected - Whether the track is selected
|
|
357
377
|
*/
|
|
358
378
|
/** Get all the audio tracks.
|
|
@@ -377,10 +397,21 @@ class RemotePlayer extends EventTarget {
|
|
|
377
397
|
return noop("RemotePlayer.selectAudioTrack", audioTrackId);
|
|
378
398
|
}
|
|
379
399
|
|
|
380
|
-
/**
|
|
400
|
+
/** Selects an audio track based on given language, role and accessibility.
|
|
401
|
+
* Tf exact track match - Best track will be selected by the internal system
|
|
402
|
+
* @param {string} language - The language of the track to select.
|
|
403
|
+
* @param {string=} role - The role of the track to select.
|
|
404
|
+
* @param {AccessibilityPurposeCode=} accessibilityPurposeCode - The accessibilityPurposeCode of the track to select. Based on DASH manifest role "urn:tva:metadata:cs:AudioPurposeCS:2007"
|
|
405
|
+
* @returns {Promise<void>} A Promise that resolves once the selection process is complete.
|
|
406
|
+
**/
|
|
407
|
+
async selectAudioLanguage(language, role="", accessibilityPurposeCode=this.AccessibilityPurposeCode.NONE) {
|
|
408
|
+
return noop("RemotePlayer.selectAudioLanguage", language, role, accessibilityPurposeCode);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/** Select a text track based on given language, role and accessibility.
|
|
381
412
|
* Track id should come from a call to getTextTracks.
|
|
382
413
|
* If no tracks exist - this is a no-op.
|
|
383
|
-
*
|
|
414
|
+
* Tf no tracks exist - fallback ID will be used by internal system to select best matching track.
|
|
384
415
|
* @param {string} textTrackId - The ID of the text track to select.
|
|
385
416
|
* @returns {Promise<void>} A Promise that resolves once the selection process is complete.
|
|
386
417
|
* @throws {RemotePlayerError} If the player is not initialized or not loaded.
|
|
@@ -389,6 +420,16 @@ class RemotePlayer extends EventTarget {
|
|
|
389
420
|
return noop("RemotePlayer.selectTextTrack", textTrackId);
|
|
390
421
|
}
|
|
391
422
|
|
|
423
|
+
/** Selects a text track based on given language, role and accessibility.
|
|
424
|
+
* Tf exact track match - Best track will be selected by the internal system
|
|
425
|
+
* @param {string} language - The language of the track to select.
|
|
426
|
+
* @param {string=} role - The role of the track to select.
|
|
427
|
+
* @param {AccessibilityPurposeCode=} accessibilityPurposeCode - The accessibilityPurposeCode of the track to select. Based on DASH manifest role "urn:tva:metadata:cs:AudioPurposeCS:2007"
|
|
428
|
+
* @returns {Promise<void>} A Promise that resolves once the selection process is complete.
|
|
429
|
+
**/
|
|
430
|
+
async selectTextLanguage(language, role="", accessibilityPurposeCode=this.AccessibilityPurposeCode.NONE) {
|
|
431
|
+
return noop("RemotePlayer.selectTextLanguage", language, role, accessibilityPurposeCode);
|
|
432
|
+
}
|
|
392
433
|
/**
|
|
393
434
|
* Enable or disable the subtitles.
|
|
394
435
|
* If the player is in an unloaded state, the request will be applied next time content is played.
|
package/src/interface/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "4.3.
|
|
1
|
+
export const version = "4.3.7-b2908c5.0";
|