shaka-player 3.1.5 → 3.2.3
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/CHANGELOG.md +129 -6
- package/README.md +4 -4
- package/build/types/polyfill +1 -0
- package/demo/common/asset.js +9 -7
- package/demo/common/assets.js +10 -1
- package/demo/common/message_ids.js +2 -1
- package/demo/config.js +5 -2
- package/demo/index.html +1 -1
- package/demo/locales/en.json +2 -1
- package/demo/locales/source.json +8 -4
- package/demo/main.js +2 -1
- package/dist/demo.compiled.debug.js +14 -14
- package/dist/demo.compiled.debug.map +2 -2
- package/dist/demo.compiled.js +14 -14
- package/dist/demo.compiled.map +2 -2
- package/dist/deps.js +21 -20
- package/dist/locales.js +30 -30
- package/dist/receiver.compiled.debug.js +8 -8
- package/dist/receiver.compiled.debug.map +2 -2
- package/dist/receiver.compiled.js +8 -8
- package/dist/receiver.compiled.map +2 -2
- package/dist/shaka-player.compiled.d.ts +63 -10
- package/dist/shaka-player.compiled.debug.d.ts +63 -10
- package/dist/shaka-player.compiled.debug.externs.js +786 -716
- package/dist/shaka-player.compiled.debug.js +563 -534
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +786 -716
- package/dist/shaka-player.compiled.js +820 -809
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +63 -10
- package/dist/shaka-player.ui.debug.d.ts +63 -10
- package/dist/shaka-player.ui.debug.externs.js +542 -472
- package/dist/shaka-player.ui.debug.js +594 -566
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +542 -472
- package/dist/shaka-player.ui.js +938 -927
- package/dist/shaka-player.ui.map +4 -4
- package/docs/tutorials/ui.md +5 -5
- package/externs/aria.js +6 -0
- package/externs/shaka/ads.js +24 -1
- package/externs/shaka/manifest.js +6 -1
- package/externs/shaka/offline.js +5 -0
- package/externs/shaka/player.js +61 -9
- package/externs/shaka/text.js +10 -10
- package/externs/texttrack.js +3 -0
- package/lib/ads/ad_manager.js +16 -15
- package/lib/ads/client_side_ad_manager.js +6 -2
- package/lib/ads/server_side_ad_manager.js +19 -2
- package/lib/cast/cast_proxy.js +8 -0
- package/lib/cast/cast_utils.js +6 -1
- package/lib/cea/cea608_data_channel.js +56 -56
- package/lib/cea/cea608_memory.js +33 -33
- package/lib/cea/cea708_service.js +43 -43
- package/lib/cea/cea708_window.js +38 -38
- package/lib/cea/cea_decoder.js +13 -14
- package/lib/cea/cea_utils.js +23 -23
- package/lib/cea/dtvcc_packet_builder.js +7 -7
- package/lib/cea/i_caption_decoder.js +2 -3
- package/lib/cea/i_cea_parser.js +2 -2
- package/lib/cea/mp4_cea_parser.js +6 -6
- package/lib/dash/dash_parser.js +5 -0
- package/lib/hls/hls_parser.js +159 -12
- package/lib/media/closed_caption_parser.js +1 -2
- package/lib/media/drm_engine.js +162 -192
- package/lib/media/segment_index.js +4 -1
- package/lib/media/segment_reference.js +37 -2
- package/lib/media/streaming_engine.js +6 -6
- package/lib/net/networking_engine.js +1 -0
- package/lib/offline/download_manager.js +1 -2
- package/lib/offline/indexeddb/v1_storage_cell.js +1 -0
- package/lib/offline/indexeddb/v2_storage_cell.js +1 -0
- package/lib/offline/manifest_converter.js +3 -1
- package/lib/offline/storage.js +12 -14
- package/lib/player.js +426 -149
- package/lib/polyfill/aria.js +82 -0
- package/lib/routing/walker.js +2 -3
- package/lib/text/srt_text_parser.js +4 -4
- package/lib/text/text_engine.js +2 -2
- package/lib/text/vtt_text_parser.js +2 -2
- package/lib/text/web_vtt_generator.js +55 -12
- package/lib/util/error.js +6 -0
- package/lib/util/manifest_parser_utils.js +1 -0
- package/lib/util/mp4_box_parsers.js +20 -20
- package/lib/util/multi_map.js +8 -0
- package/lib/util/player_configuration.js +13 -1
- package/lib/util/stream_utils.js +168 -88
- package/lib/util/xml_utils.js +31 -12
- package/package.json +1 -1
- package/roadmap.md +24 -22
- package/shaka-player.uncompiled.js +1 -0
- package/test/cast/cast_utils_unit.js +1 -0
- package/test/cea/cea608_memory_unit.js +1 -1
- package/test/cea/cea708_service_unit.js +8 -8
- package/test/cea/cea708_window_unit.js +6 -6
- package/test/cea/cea_decoder_unit.js +1 -1
- package/test/cea/dtvcc_packet_builder_unit.js +2 -2
- package/test/dash/dash_parser_manifest_unit.js +43 -1
- package/test/hls/hls_parser_unit.js +250 -0
- package/test/media/drm_engine_integration.js +86 -12
- package/test/media/drm_engine_unit.js +310 -450
- package/test/offline/manifest_convert_unit.js +2 -0
- package/test/offline/storage_integration.js +9 -19
- package/test/player_integration.js +85 -0
- package/test/player_src_equals_integration.js +85 -0
- package/test/player_unit.js +25 -37
- package/test/test/assets/chapters.srt +11 -0
- package/test/test/assets/chapters.vtt +10 -0
- package/test/test/assets/chapters2.vtt +10 -0
- package/test/test/util/cea_utils.js +12 -12
- package/test/test/util/fake_ad_manager.js +7 -0
- package/test/test/util/manifest_generator.js +2 -0
- package/test/test/util/manifest_parser_util.js +3 -1
- package/test/text/web_vtt_generator_unit.js +81 -7
- package/test/util/stream_utils_unit.js +118 -10
- package/ui/airplay_button.js +1 -1
- package/ui/audio_language_selection.js +2 -5
- package/ui/cast_button.js +4 -6
- package/ui/constants.js +0 -3
- package/ui/fast_forward_button.js +2 -3
- package/ui/fullscreen_button.js +1 -3
- package/ui/language_utils.js +1 -1
- package/ui/loop_button.js +1 -3
- package/ui/mute_button.js +1 -3
- package/ui/overflow_menu.js +2 -3
- package/ui/pip_button.js +5 -7
- package/ui/playback_rate_selection.js +3 -6
- package/ui/presentation_time.js +1 -3
- package/ui/resolution_selection.js +4 -7
- package/ui/rewind_button.js +2 -3
- package/ui/seek_bar.js +2 -4
- package/ui/spacer.js +1 -1
- package/ui/text_selection.js +8 -11
- package/ui/ui_utils.js +1 -1
- package/ui/volume_bar.js +1 -3
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/*! @license
|
|
2
|
+
* Shaka Player
|
|
3
|
+
* Copyright 2016 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
goog.provide('shaka.polyfill.Aria');
|
|
8
|
+
|
|
9
|
+
goog.require('shaka.log');
|
|
10
|
+
goog.require('shaka.polyfill');
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @summary A polyfill to add support for the ARIAMixin interface mixin, for
|
|
14
|
+
* browsers that do not implement it (e.g. Firefox).
|
|
15
|
+
* Note that IE also does not support ARIAMixin, but this polyfill does not work
|
|
16
|
+
* for that platform, as it relies on getters and setters.
|
|
17
|
+
* @see https://w3c.github.io/aria/#ARIAMixin
|
|
18
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element
|
|
19
|
+
* @export
|
|
20
|
+
*/
|
|
21
|
+
shaka.polyfill.Aria = class {
|
|
22
|
+
/**
|
|
23
|
+
* Install the polyfill if needed.
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
static install() {
|
|
27
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
28
|
+
if (Object.getOwnPropertyDescriptor(Element.prototype, 'ariaHidden')) {
|
|
29
|
+
shaka.log.info('Using native ARIAMixin interface.');
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
shaka.log.info('ARIAMixin interface not detected. Installing polyfill.');
|
|
33
|
+
|
|
34
|
+
// Define a list of all of the ARIAMixin properties that we have externs
|
|
35
|
+
// for.
|
|
36
|
+
const attributes = [
|
|
37
|
+
'ariaHidden',
|
|
38
|
+
'ariaLabel',
|
|
39
|
+
'ariaPressed',
|
|
40
|
+
'ariaSelected',
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
// Add each attribute, one by one.
|
|
44
|
+
for (const attribute of attributes) {
|
|
45
|
+
shaka.polyfill.Aria.addARIAMixinAttribute_(attribute);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Adds an attribute with the given name.
|
|
51
|
+
* @param {string} name The name of the attribute, in camelCase.
|
|
52
|
+
* @private
|
|
53
|
+
*/
|
|
54
|
+
static addARIAMixinAttribute_(name) {
|
|
55
|
+
const baseName = name.toLowerCase().replace(/^aria/, '');
|
|
56
|
+
// NOTE: All the attributes listed in the method above begin with "aria".
|
|
57
|
+
// However, to add extra protection against the possibility of XSS attacks
|
|
58
|
+
// through this method, this enforces "aria-" at the beginning of the
|
|
59
|
+
// snake-case name, even if somehow "aria" were missing from the input.
|
|
60
|
+
const snakeCaseName = `aria-${baseName}`;
|
|
61
|
+
|
|
62
|
+
/* eslint-disable no-restricted-syntax */
|
|
63
|
+
Object.defineProperty(Element.prototype, name, {
|
|
64
|
+
get() {
|
|
65
|
+
const element = /** @type {!Element} */ (this);
|
|
66
|
+
return element.getAttribute(snakeCaseName);
|
|
67
|
+
},
|
|
68
|
+
set(value) {
|
|
69
|
+
const element = /** @type {!Element} */ (this);
|
|
70
|
+
if (value == null || value == undefined) {
|
|
71
|
+
element.removeAttribute(snakeCaseName);
|
|
72
|
+
} else {
|
|
73
|
+
element.setAttribute(snakeCaseName, value);
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
/* eslint-enable no-restricted-syntax */
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
shaka.polyfill.register(shaka.polyfill.Aria.install);
|
package/lib/routing/walker.js
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
goog.provide('shaka.routing.Walker');
|
|
8
|
-
goog.provide('shaka.routing.Walker.Implementation');
|
|
9
8
|
|
|
10
9
|
goog.require('goog.asserts');
|
|
11
10
|
goog.require('shaka.routing.Node');
|
|
@@ -81,7 +80,7 @@ shaka.routing.Walker = class {
|
|
|
81
80
|
* new work is added (and this is not null) it can be resolved. The only
|
|
82
81
|
* time when this should be non-null is when we are waiting for more work.
|
|
83
82
|
*
|
|
84
|
-
* @private {shaka.util.PublicPromise}
|
|
83
|
+
* @private {?shaka.util.PublicPromise}
|
|
85
84
|
*/
|
|
86
85
|
this.waitForWork_ = null;
|
|
87
86
|
|
|
@@ -91,7 +90,7 @@ shaka.routing.Walker = class {
|
|
|
91
90
|
/** @private {?shaka.routing.Walker.ActiveRoute_} */
|
|
92
91
|
this.currentRoute_ = null;
|
|
93
92
|
|
|
94
|
-
/** @private {shaka.util.AbortableOperation} */
|
|
93
|
+
/** @private {?shaka.util.AbortableOperation} */
|
|
95
94
|
this.currentStep_ = null;
|
|
96
95
|
|
|
97
96
|
/**
|
|
@@ -57,8 +57,8 @@ shaka.text.SrtTextParser = class {
|
|
|
57
57
|
/**
|
|
58
58
|
* Convert a SRT format to WebVTT
|
|
59
59
|
*
|
|
60
|
-
* @param {
|
|
61
|
-
* @return {
|
|
60
|
+
* @param {string} data
|
|
61
|
+
* @return {string}
|
|
62
62
|
* @export
|
|
63
63
|
*/
|
|
64
64
|
static srt2webvtt(data) {
|
|
@@ -87,8 +87,8 @@ shaka.text.SrtTextParser = class {
|
|
|
87
87
|
/**
|
|
88
88
|
* Convert a SRT cue into WebVTT cue
|
|
89
89
|
*
|
|
90
|
-
* @param {
|
|
91
|
-
* @return {
|
|
90
|
+
* @param {string} caption
|
|
91
|
+
* @return {string}
|
|
92
92
|
* @private
|
|
93
93
|
*/
|
|
94
94
|
static convertSrtCue_(caption) {
|
package/lib/text/text_engine.js
CHANGED
|
@@ -12,7 +12,7 @@ goog.require('shaka.util.BufferUtils');
|
|
|
12
12
|
goog.require('shaka.util.Functional');
|
|
13
13
|
goog.require('shaka.util.IDestroyable');
|
|
14
14
|
goog.require('shaka.util.MimeUtils');
|
|
15
|
-
goog.requireType('shaka.cea.ICaptionDecoder
|
|
15
|
+
goog.requireType('shaka.cea.ICaptionDecoder');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
// TODO: revisit this when Closure Compiler supports partially-exported classes.
|
|
@@ -24,7 +24,7 @@ goog.requireType('shaka.cea.ICaptionDecoder.ClosedCaption');
|
|
|
24
24
|
shaka.text.TextEngine = class {
|
|
25
25
|
/** @param {shaka.extern.TextDisplayer} displayer */
|
|
26
26
|
constructor(displayer) {
|
|
27
|
-
/** @private {shaka.extern.TextParser} */
|
|
27
|
+
/** @private {?shaka.extern.TextParser} */
|
|
28
28
|
this.parser_ = null;
|
|
29
29
|
|
|
30
30
|
/** @private {shaka.extern.TextDisplayer} */
|
|
@@ -464,8 +464,8 @@ shaka.text.VttTextParser = class {
|
|
|
464
464
|
}
|
|
465
465
|
|
|
466
466
|
/**
|
|
467
|
-
* @param {
|
|
468
|
-
* @param {
|
|
467
|
+
* @param {string} value
|
|
468
|
+
* @param {string} defaultValue
|
|
469
469
|
* @private
|
|
470
470
|
*/
|
|
471
471
|
static getOrDefault_(value, defaultValue) {
|
|
@@ -17,9 +17,10 @@ goog.require('shaka.text.Cue');
|
|
|
17
17
|
shaka.text.WebVttGenerator = class {
|
|
18
18
|
/**
|
|
19
19
|
* @param {!Array.<!shaka.text.Cue>} cues
|
|
20
|
+
* @param {!Array.<!shaka.extern.AdCuePoint>} adCuePoints
|
|
20
21
|
* @return {string}
|
|
21
22
|
*/
|
|
22
|
-
static convert(cues) {
|
|
23
|
+
static convert(cues, adCuePoints) {
|
|
23
24
|
// Flatten nested cue payloads recursively. If a cue has nested cues,
|
|
24
25
|
// their contents should be combined and replace the payload of the parent.
|
|
25
26
|
const flattenPayload = (cue) => {
|
|
@@ -64,6 +65,25 @@ shaka.text.WebVttGenerator = class {
|
|
|
64
65
|
}
|
|
65
66
|
};
|
|
66
67
|
|
|
68
|
+
const webvttTimeString = (time) => {
|
|
69
|
+
let newTime = time;
|
|
70
|
+
for (const adCuePoint of adCuePoints) {
|
|
71
|
+
if (adCuePoint.end && adCuePoint.start < time) {
|
|
72
|
+
const offset = adCuePoint.end - adCuePoint.start;
|
|
73
|
+
newTime += offset;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
const hours = Math.floor(newTime / 3600);
|
|
77
|
+
const minutes = Math.floor(newTime / 60 % 60);
|
|
78
|
+
const seconds = Math.floor(newTime % 60);
|
|
79
|
+
const milliseconds = Math.floor(newTime * 1000 % 1000);
|
|
80
|
+
return (hours < 10 ? '0' : '') + hours + ':' +
|
|
81
|
+
(minutes < 10 ? '0' : '') + minutes + ':' +
|
|
82
|
+
(seconds < 10 ? '0' : '') + seconds + '.' +
|
|
83
|
+
(milliseconds < 100 ? (milliseconds < 10 ? '00' : '0') : '') +
|
|
84
|
+
milliseconds;
|
|
85
|
+
};
|
|
86
|
+
|
|
67
87
|
// We don't want to modify the array or objects passed in, since we don't
|
|
68
88
|
// technically own them. So we build a new array and replace certain items
|
|
69
89
|
// in it if they need to be flattened.
|
|
@@ -80,19 +100,42 @@ shaka.text.WebVttGenerator = class {
|
|
|
80
100
|
|
|
81
101
|
let webvttString = 'WEBVTT\n\n';
|
|
82
102
|
for (const cue of flattenedCues) {
|
|
83
|
-
const
|
|
84
|
-
const
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
(
|
|
92
|
-
|
|
103
|
+
const webvttSettings = (cue) => {
|
|
104
|
+
const settings = [];
|
|
105
|
+
const Cue = shaka.text.Cue;
|
|
106
|
+
switch (cue.textAlign) {
|
|
107
|
+
case Cue.textAlign.LEFT:
|
|
108
|
+
settings.push('align:left');
|
|
109
|
+
break;
|
|
110
|
+
case Cue.textAlign.RIGHT:
|
|
111
|
+
settings.push('align:right');
|
|
112
|
+
break;
|
|
113
|
+
case Cue.textAlign.CENTER:
|
|
114
|
+
settings.push('align:middle');
|
|
115
|
+
break;
|
|
116
|
+
case Cue.textAlign.START:
|
|
117
|
+
settings.push('align:start');
|
|
118
|
+
break;
|
|
119
|
+
case Cue.textAlign.END:
|
|
120
|
+
settings.push('align:end');
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
switch (cue.writingMode) {
|
|
124
|
+
case Cue.writingMode.VERTICAL_LEFT_TO_RIGHT:
|
|
125
|
+
settings.push('vertical:lr');
|
|
126
|
+
break;
|
|
127
|
+
case Cue.writingMode.VERTICAL_RIGHT_TO_LEFT:
|
|
128
|
+
settings.push('vertical:rl');
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
if (settings.length) {
|
|
133
|
+
return ' ' + settings.join(' ');
|
|
134
|
+
}
|
|
135
|
+
return '';
|
|
93
136
|
};
|
|
94
137
|
webvttString += webvttTimeString(cue.startTime) + ' --> ' +
|
|
95
|
-
webvttTimeString(cue.endTime) + '\n';
|
|
138
|
+
webvttTimeString(cue.endTime) + webvttSettings(cue) + '\n';
|
|
96
139
|
webvttString += cue.payload + '\n\n';
|
|
97
140
|
}
|
|
98
141
|
return webvttString;
|
package/lib/util/error.js
CHANGED
|
@@ -814,6 +814,12 @@ shaka.util.Error.Code = {
|
|
|
814
814
|
*/
|
|
815
815
|
'INIT_DATA_TRANSFORM_ERROR': 6016,
|
|
816
816
|
|
|
817
|
+
/**
|
|
818
|
+
* The server certificate request failed.
|
|
819
|
+
* <br> error.data[0] is a shaka.util.Error from the networking engine.
|
|
820
|
+
*/
|
|
821
|
+
'SERVER_CERTIFICATE_REQUEST_FAILED': 6017,
|
|
822
|
+
|
|
817
823
|
|
|
818
824
|
/**
|
|
819
825
|
* The call to Player.load() was interrupted by a call to Player.unload()
|
|
@@ -14,7 +14,7 @@ shaka.util.Mp4BoxParsers = class {
|
|
|
14
14
|
/**
|
|
15
15
|
* Parses a TFHD Box.
|
|
16
16
|
* @param {!shaka.util.DataViewReader} reader
|
|
17
|
-
* @param {
|
|
17
|
+
* @param {number} flags
|
|
18
18
|
* @return {!shaka.util.ParsedTFHDBox}
|
|
19
19
|
*/
|
|
20
20
|
static parseTFHD(reader, flags) {
|
|
@@ -53,7 +53,7 @@ shaka.util.Mp4BoxParsers = class {
|
|
|
53
53
|
/**
|
|
54
54
|
* Parses a TFDT Box.
|
|
55
55
|
* @param {!shaka.util.DataViewReader} reader
|
|
56
|
-
* @param {
|
|
56
|
+
* @param {number} version
|
|
57
57
|
* @return {!shaka.util.ParsedTFDTBox}
|
|
58
58
|
*/
|
|
59
59
|
static parseTFDT(reader, version) {
|
|
@@ -68,7 +68,7 @@ shaka.util.Mp4BoxParsers = class {
|
|
|
68
68
|
/**
|
|
69
69
|
* Parses a MDHD Box.
|
|
70
70
|
* @param {!shaka.util.DataViewReader} reader
|
|
71
|
-
* @param {
|
|
71
|
+
* @param {number} version
|
|
72
72
|
* @return {!shaka.util.ParsedMDHDBox}
|
|
73
73
|
*/
|
|
74
74
|
static parseMDHD(reader, version) {
|
|
@@ -107,8 +107,8 @@ shaka.util.Mp4BoxParsers = class {
|
|
|
107
107
|
/**
|
|
108
108
|
* Parses a TRUN Box.
|
|
109
109
|
* @param {!shaka.util.DataViewReader} reader
|
|
110
|
-
* @param {
|
|
111
|
-
* @param {
|
|
110
|
+
* @param {number} version
|
|
111
|
+
* @param {number} flags
|
|
112
112
|
* @return {!shaka.util.ParsedTRUNBox}
|
|
113
113
|
*/
|
|
114
114
|
static parseTRUN(reader, version, flags) {
|
|
@@ -168,7 +168,7 @@ shaka.util.Mp4BoxParsers = class {
|
|
|
168
168
|
/**
|
|
169
169
|
* Parses a TKHD Box.
|
|
170
170
|
* @param {!shaka.util.DataViewReader} reader
|
|
171
|
-
* @param {
|
|
171
|
+
* @param {number} version
|
|
172
172
|
* @return {!shaka.util.ParsedTKHDBox}
|
|
173
173
|
*/
|
|
174
174
|
static parseTKHD(reader, version) {
|
|
@@ -192,12 +192,12 @@ shaka.util.Mp4BoxParsers = class {
|
|
|
192
192
|
|
|
193
193
|
/**
|
|
194
194
|
* @typedef {{
|
|
195
|
-
* trackId:
|
|
195
|
+
* trackId: number,
|
|
196
196
|
* defaultSampleDuration: ?number,
|
|
197
197
|
* defaultSampleSize: ?number
|
|
198
198
|
* }}
|
|
199
199
|
*
|
|
200
|
-
* @property {
|
|
200
|
+
* @property {number} trackId
|
|
201
201
|
* As per the spec: an integer that uniquely identifies this
|
|
202
202
|
* track over the entire life‐time of this presentation
|
|
203
203
|
* @property {?number} defaultSampleDuration
|
|
@@ -213,10 +213,10 @@ shaka.util.ParsedTFHDBox;
|
|
|
213
213
|
|
|
214
214
|
/**
|
|
215
215
|
* @typedef {{
|
|
216
|
-
* baseMediaDecodeTime:
|
|
216
|
+
* baseMediaDecodeTime: number
|
|
217
217
|
* }}
|
|
218
218
|
*
|
|
219
|
-
* @property {
|
|
219
|
+
* @property {number} baseMediaDecodeTime
|
|
220
220
|
* As per the spec: the absolute decode time, measured on the media
|
|
221
221
|
* timeline, of the first sample in decode order in the track fragment
|
|
222
222
|
*
|
|
@@ -226,10 +226,10 @@ shaka.util.ParsedTFDTBox;
|
|
|
226
226
|
|
|
227
227
|
/**
|
|
228
228
|
* @typedef {{
|
|
229
|
-
* timescale:
|
|
229
|
+
* timescale: number
|
|
230
230
|
* }}
|
|
231
231
|
*
|
|
232
|
-
* @property {
|
|
232
|
+
* @property {number} timescale
|
|
233
233
|
* As per the spec: an integer that specifies the time‐scale for this media;
|
|
234
234
|
* this is the number of time units that pass in one second
|
|
235
235
|
*
|
|
@@ -239,13 +239,13 @@ shaka.util.ParsedMDHDBox;
|
|
|
239
239
|
|
|
240
240
|
/**
|
|
241
241
|
* @typedef {{
|
|
242
|
-
* defaultSampleDuration:
|
|
243
|
-
* defaultSampleSize:
|
|
242
|
+
* defaultSampleDuration: number,
|
|
243
|
+
* defaultSampleSize: number
|
|
244
244
|
* }}
|
|
245
245
|
*
|
|
246
|
-
* @property {
|
|
246
|
+
* @property {number} defaultSampleDuration
|
|
247
247
|
* The default sample duration to be used in track fragments
|
|
248
|
-
* @property {
|
|
248
|
+
* @property {number} defaultSampleSize
|
|
249
249
|
* The default sample size to be used in track fragments
|
|
250
250
|
*
|
|
251
251
|
* @exportDoc
|
|
@@ -254,11 +254,11 @@ shaka.util.ParsedTREXBox;
|
|
|
254
254
|
|
|
255
255
|
/**
|
|
256
256
|
* @typedef {{
|
|
257
|
-
* sampleCount:
|
|
257
|
+
* sampleCount: number,
|
|
258
258
|
* sampleData: !Array.<shaka.util.ParsedTRUNSample>
|
|
259
259
|
* }}
|
|
260
260
|
*
|
|
261
|
-
* @property {
|
|
261
|
+
* @property {number} sampleCount
|
|
262
262
|
* As per the spec: the number of samples being added in this run;
|
|
263
263
|
* @property {!Array.<shaka.util.ParsedTRUNSample>} sampleData
|
|
264
264
|
* An array of size <sampleCount> containing data for each sample
|
|
@@ -290,10 +290,10 @@ shaka.util.ParsedTRUNSample;
|
|
|
290
290
|
|
|
291
291
|
/**
|
|
292
292
|
* @typedef {{
|
|
293
|
-
* trackId:
|
|
293
|
+
* trackId: number
|
|
294
294
|
* }}
|
|
295
295
|
*
|
|
296
|
-
* @property {
|
|
296
|
+
* @property {number} trackId
|
|
297
297
|
* Unique ID indicative of this track
|
|
298
298
|
*
|
|
299
299
|
* @exportDoc
|
package/lib/util/multi_map.js
CHANGED
|
@@ -75,6 +75,7 @@ shaka.util.PlayerConfiguration = class {
|
|
|
75
75
|
initDataTransform: shaka.media.DrmEngine.defaultInitDataTransform,
|
|
76
76
|
logLicenseExchange: false,
|
|
77
77
|
updateExpirationTime: 1,
|
|
78
|
+
preferredKeySystems: [],
|
|
78
79
|
};
|
|
79
80
|
|
|
80
81
|
const manifest = {
|
|
@@ -108,9 +109,16 @@ shaka.util.PlayerConfiguration = class {
|
|
|
108
109
|
'urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb':
|
|
109
110
|
'com.adobe.primetime',
|
|
110
111
|
},
|
|
112
|
+
// Need some operation in the callback or else closure may remove calls
|
|
113
|
+
// to the function as it would be a no-op. The operation can't just be
|
|
114
|
+
// a log message, because those are stripped in the compiled build.
|
|
115
|
+
manifestPreprocessor: (element) => {
|
|
116
|
+
return element;
|
|
117
|
+
},
|
|
111
118
|
},
|
|
112
119
|
hls: {
|
|
113
120
|
ignoreTextStreamFailures: false,
|
|
121
|
+
ignoreImageStreamFailures: false,
|
|
114
122
|
useFullSegmentsForStartTime: false,
|
|
115
123
|
},
|
|
116
124
|
};
|
|
@@ -154,6 +162,7 @@ shaka.util.PlayerConfiguration = class {
|
|
|
154
162
|
autoLowLatencyMode: false,
|
|
155
163
|
forceHTTPS: false,
|
|
156
164
|
preferNativeHls: false,
|
|
165
|
+
updateIntervalSeconds: 1,
|
|
157
166
|
};
|
|
158
167
|
|
|
159
168
|
// Some browsers will stop earlier than others before a gap (e.g., Edge
|
|
@@ -241,7 +250,10 @@ shaka.util.PlayerConfiguration = class {
|
|
|
241
250
|
preferredVariantRole: '',
|
|
242
251
|
preferredTextRole: '',
|
|
243
252
|
preferredAudioChannelCount: 2,
|
|
253
|
+
preferredVideoCodecs: [],
|
|
254
|
+
preferredAudioCodecs: [],
|
|
244
255
|
preferForcedSubs: false,
|
|
256
|
+
preferredDecodingAttributes: [],
|
|
245
257
|
restrictions: {
|
|
246
258
|
minWidth: 0,
|
|
247
259
|
maxWidth: Infinity,
|
|
@@ -256,7 +268,6 @@ shaka.util.PlayerConfiguration = class {
|
|
|
256
268
|
},
|
|
257
269
|
playRangeStart: 0,
|
|
258
270
|
playRangeEnd: Infinity,
|
|
259
|
-
useMediaCapabilities: false,
|
|
260
271
|
textDisplayFactory: () => null,
|
|
261
272
|
};
|
|
262
273
|
|
|
@@ -293,6 +304,7 @@ shaka.util.PlayerConfiguration = class {
|
|
|
293
304
|
audioRobustness: '',
|
|
294
305
|
sessionType: '',
|
|
295
306
|
serverCertificate: new Uint8Array(0),
|
|
307
|
+
serverCertificateUri: '',
|
|
296
308
|
individualizationServer: '',
|
|
297
309
|
},
|
|
298
310
|
};
|