shaka-player 3.1.3 → 3.2.2
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/AUTHORS +3 -0
- package/CHANGELOG.md +175 -3
- package/CONTRIBUTORS +3 -0
- package/README.md +4 -4
- package/build/generateExterns.js +1 -1
- package/build/types/polyfill +1 -0
- package/demo/common/asset.js +9 -7
- package/demo/common/assets.js +11 -2
- 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/controls.css +2 -2
- package/dist/controls.css.map +1 -1
- package/dist/demo.compiled.debug.js +15 -15
- package/dist/demo.compiled.debug.map +2 -2
- package/dist/demo.compiled.js +15 -15
- package/dist/demo.compiled.map +2 -2
- package/dist/deps.js +22 -21
- package/dist/locales.js +36 -36
- package/dist/receiver.compiled.debug.js +9 -9
- package/dist/receiver.compiled.debug.map +2 -2
- package/dist/receiver.compiled.js +9 -9
- package/dist/receiver.compiled.map +2 -2
- package/dist/shaka-player.compiled.d.ts +58 -10
- package/dist/shaka-player.compiled.debug.d.ts +58 -10
- package/dist/shaka-player.compiled.debug.externs.js +777 -717
- package/dist/shaka-player.compiled.debug.js +639 -607
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +777 -717
- package/dist/shaka-player.compiled.js +826 -819
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +58 -10
- package/dist/shaka-player.ui.debug.d.ts +58 -10
- package/dist/shaka-player.ui.debug.externs.js +529 -469
- package/dist/shaka-player.ui.debug.js +676 -645
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +529 -469
- package/dist/shaka-player.ui.js +963 -955
- package/dist/shaka-player.ui.map +4 -4
- package/docs/tutorials/fairplay.md +1 -1
- 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 +53 -9
- package/externs/shaka/text.js +10 -10
- package/externs/texttrack.js +3 -0
- package/karma.conf.js +1 -0
- package/lib/ads/ad_manager.js +16 -15
- package/lib/ads/client_side_ad_manager.js +52 -88
- package/lib/ads/server_side_ad_manager.js +26 -12
- package/lib/cast/cast_proxy.js +11 -2
- package/lib/cast/cast_receiver.js +2 -1
- package/lib/cast/cast_sender.js +2 -2
- 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 +98 -2
- package/lib/dash/segment_list.js +1 -1
- package/lib/dash/segment_template.js +1 -1
- package/lib/hls/hls_parser.js +159 -29
- package/lib/media/closed_caption_parser.js +1 -2
- package/lib/media/drm_engine.js +169 -192
- package/lib/media/gap_jumping_controller.js +4 -2
- package/lib/media/media_source_engine.js +1 -2
- package/lib/media/segment_index.js +3 -1
- package/lib/media/segment_reference.js +19 -2
- package/lib/media/streaming_engine.js +8 -7
- package/lib/net/networking_engine.js +3 -1
- 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 +437 -167
- package/lib/polyfill/aria.js +82 -0
- package/lib/polyfill/media_capabilities.js +7 -1
- package/lib/polyfill/mediasource.js +6 -0
- package/lib/polyfill/orientation.js +1 -1
- package/lib/polyfill/patchedmediakeys_apple.js +4 -4
- package/lib/polyfill/patchedmediakeys_ms.js +4 -4
- package/lib/polyfill/patchedmediakeys_webkit.js +4 -4
- package/lib/routing/walker.js +2 -3
- package/lib/text/mp4_ttml_parser.js +3 -0
- package/lib/text/srt_text_parser.js +4 -4
- package/lib/text/text_engine.js +16 -4
- package/lib/text/ttml_text_parser.js +5 -0
- package/lib/text/ui_text_displayer.js +85 -37
- 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/fake_event.js +53 -7
- 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/periods.js +4 -1
- package/lib/util/platform.js +13 -1
- package/lib/util/player_configuration.js +13 -1
- package/lib/util/stream_utils.js +153 -85
- 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_proxy_unit.js +12 -6
- package/test/cast/cast_utils_unit.js +2 -1
- 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 +230 -2
- package/test/hls/hls_parser_unit.js +255 -1
- package/test/media/closed_caption_parser_unit.js +6 -1
- package/test/media/drm_engine_integration.js +86 -12
- package/test/media/drm_engine_unit.js +353 -450
- package/test/offline/manifest_convert_unit.js +2 -0
- package/test/offline/storage_integration.js +9 -19
- package/test/player_integration.js +90 -0
- package/test/player_src_equals_integration.js +52 -0
- package/test/player_unit.js +11 -33
- package/test/test/assets/3675/chunk-stream0-00001.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00002.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00003.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00004.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00005.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00006.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00007.m4s +0 -0
- package/test/test/assets/3675/dash_0.mpd +30 -0
- package/test/test/assets/3675/dash_1.mpd +30 -0
- package/test/test/assets/3675/dash_2.mpd +30 -0
- package/test/test/assets/3675/dash_3.mpd +30 -0
- package/test/test/assets/3675/dash_4.mpd +30 -0
- package/test/test/assets/3675/dash_5.mpd +26 -0
- package/test/test/assets/3675/init-stream0.m4s +0 -0
- package/test/test/assets/chapters.srt +11 -0
- package/test/test/assets/chapters.vtt +10 -0
- package/test/test/util/cea_utils.js +12 -12
- package/test/test/util/fake_ad_manager.js +8 -1
- package/test/test/util/manifest_generator.js +2 -0
- package/test/test/util/manifest_parser_util.js +3 -1
- package/test/text/ttml_text_parser_unit.js +9 -0
- package/test/text/ui_text_displayer_unit.js +29 -17
- package/test/text/web_vtt_generator_unit.js +81 -7
- package/test/ui/localization_unit.js +15 -14
- package/test/ui/text_displayer_layout_unit.js +13 -1
- package/test/util/stream_utils_unit.js +153 -10
- package/ui/airplay_button.js +1 -1
- package/ui/audio_language_selection.js +2 -5
- package/ui/cast_button.js +6 -9
- package/ui/constants.js +0 -3
- package/ui/controls.js +4 -6
- package/ui/fast_forward_button.js +2 -3
- package/ui/fullscreen_button.js +1 -3
- package/ui/language_utils.js +1 -1
- package/ui/less/containers.less +3 -7
- package/ui/locales/ru.json +6 -6
- package/ui/localization.js +28 -51
- 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 +7 -10
- 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
|
@@ -31,7 +31,7 @@ player.configure('drm.initDataTransform', (initData, initDataType) => {
|
|
|
31
31
|
|
|
32
32
|
// 'initData' is a buffer containing an 'skd://' URL as a UTF-8 string.
|
|
33
33
|
const skdUri = shaka.util.StringUtils.fromBytesAutoDetect(initData);
|
|
34
|
-
const contentId = getMyContentId(
|
|
34
|
+
const contentId = getMyContentId(skdUri);
|
|
35
35
|
const cert = player.drmInfo().serverCertificate;
|
|
36
36
|
return shaka.util.FairPlayUtils.initDataTransform(initData, contentId, cert);
|
|
37
37
|
});
|
package/docs/tutorials/ui.md
CHANGED
|
@@ -30,7 +30,7 @@ Set up controls with HTML data attributes:
|
|
|
30
30
|
The data-shaka-player-cast-receiver-id tag allows you to provide a Cast Application ID that
|
|
31
31
|
the cast button will cast to; the value provided here is the sample cast receiver. -->
|
|
32
32
|
<div data-shaka-player-container style="max-width:40em"
|
|
33
|
-
data-shaka-player-cast-receiver-id="
|
|
33
|
+
data-shaka-player-cast-receiver-id="E7271BEC">
|
|
34
34
|
<!-- The data-shaka-player tag will make the UI library use this video element.
|
|
35
35
|
If no video is provided, the UI will automatically make one inside the container div. -->
|
|
36
36
|
<video autoplay data-shaka-player id="video" style="width:100%;height:100%"></video>
|
|
@@ -111,7 +111,7 @@ set up a listener for the 'caststatuschanged' events.
|
|
|
111
111
|
<!-- Add a data-shaka-player-cast-receiver-id tag to provide a Cast Application ID that
|
|
112
112
|
the cast button will cast to; the value provided here is the sample cast receiver. -->
|
|
113
113
|
<div data-shaka-player-container style="max-width:40em"
|
|
114
|
-
data-shaka-player-cast-receiver-id="
|
|
114
|
+
data-shaka-player-cast-receiver-id="E7271BEC">
|
|
115
115
|
</div>
|
|
116
116
|
```
|
|
117
117
|
|
|
@@ -137,7 +137,7 @@ or a `<source>` tag inside it to enable auto loading of the specified content.
|
|
|
137
137
|
|
|
138
138
|
```html
|
|
139
139
|
<div data-shaka-player-container style="max-width:40em"
|
|
140
|
-
data-shaka-player-cast-receiver-id="
|
|
140
|
+
data-shaka-player-cast-receiver-id="E7271BEC">
|
|
141
141
|
<!-- The manifest url in the src attribute will be automatically loaded -->
|
|
142
142
|
<video autoplay data-shaka-player id="video" style="width:100%;height:100%"
|
|
143
143
|
src="https://storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd"></video>
|
|
@@ -148,7 +148,7 @@ or
|
|
|
148
148
|
|
|
149
149
|
```html
|
|
150
150
|
<div data-shaka-player-container style="max-width:40em"
|
|
151
|
-
data-shaka-player-cast-receiver-id="
|
|
151
|
+
data-shaka-player-cast-receiver-id="E7271BEC">
|
|
152
152
|
<video autoplay data-shaka-player id="video" style="width:100%;height:100%">
|
|
153
153
|
<!-- The manifest url in the src attribute will be auto loaded -->
|
|
154
154
|
<source src="https://storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd"/>
|
|
@@ -161,7 +161,7 @@ call to the first one fails.
|
|
|
161
161
|
|
|
162
162
|
```html
|
|
163
163
|
<div data-shaka-player-container style="max-width:40em"
|
|
164
|
-
data-shaka-player-cast-receiver-id="
|
|
164
|
+
data-shaka-player-cast-receiver-id="E7271BEC">
|
|
165
165
|
<video autoplay data-shaka-player id="video" style="width:100%;height:100%">
|
|
166
166
|
<!-- Try this first -->
|
|
167
167
|
<source src="https://storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd"/>
|
package/externs/aria.js
CHANGED
package/externs/shaka/ads.js
CHANGED
|
@@ -33,6 +33,24 @@
|
|
|
33
33
|
shaka.extern.AdsStats;
|
|
34
34
|
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* @typedef {{
|
|
38
|
+
* start: number,
|
|
39
|
+
* end: ?number
|
|
40
|
+
* }}
|
|
41
|
+
*
|
|
42
|
+
* @description
|
|
43
|
+
* Contains the times of a range of an Ad.
|
|
44
|
+
*
|
|
45
|
+
* @property {number} start
|
|
46
|
+
* The start time of the range, in milliseconds.
|
|
47
|
+
* @property {number} end
|
|
48
|
+
* The end time of the range, in milliseconds.
|
|
49
|
+
* @exportDoc
|
|
50
|
+
*/
|
|
51
|
+
shaka.extern.AdCuePoint;
|
|
52
|
+
|
|
53
|
+
|
|
36
54
|
/**
|
|
37
55
|
* An object that's responsible for all the ad-related logic
|
|
38
56
|
* in the player.
|
|
@@ -70,7 +88,7 @@ shaka.extern.IAdManager = class extends EventTarget {
|
|
|
70
88
|
/**
|
|
71
89
|
* @param {!google.ima.dai.api.StreamRequest} imaRequest
|
|
72
90
|
* @param {string=} backupUrl
|
|
73
|
-
* @return {!Promise
|
|
91
|
+
* @return {!Promise.<string>}
|
|
74
92
|
*/
|
|
75
93
|
requestServerSideStream(imaRequest, backupUrl) {}
|
|
76
94
|
|
|
@@ -79,6 +97,11 @@ shaka.extern.IAdManager = class extends EventTarget {
|
|
|
79
97
|
*/
|
|
80
98
|
replaceServerSideAdTagParameters(adTagParameters) {}
|
|
81
99
|
|
|
100
|
+
/**
|
|
101
|
+
* @return {!Array.<!shaka.extern.AdCuePoint>}
|
|
102
|
+
*/
|
|
103
|
+
getServerSideCuePoints() {}
|
|
104
|
+
|
|
82
105
|
/**
|
|
83
106
|
* Get statistics for the current playback session. If the player is not
|
|
84
107
|
* playing content, this will return an empty stats object.
|
|
@@ -111,6 +111,7 @@ shaka.extern.InitDataOverride;
|
|
|
111
111
|
* audioRobustness: string,
|
|
112
112
|
* videoRobustness: string,
|
|
113
113
|
* serverCertificate: Uint8Array,
|
|
114
|
+
* serverCertificateUri: string,
|
|
114
115
|
* sessionType: string,
|
|
115
116
|
* initData: Array.<!shaka.extern.InitDataOverride>,
|
|
116
117
|
* keyIds: Set.<string>
|
|
@@ -150,6 +151,10 @@ shaka.extern.InitDataOverride;
|
|
|
150
151
|
* A key-system-specific server certificate used to encrypt license requests.
|
|
151
152
|
* Its use is optional and is meant as an optimization to avoid a round-trip
|
|
152
153
|
* to request a certificate.
|
|
154
|
+
* @property {string} serverCertificateUri
|
|
155
|
+
* <i>Defaults to '', e.g., server certificate will be requested from the
|
|
156
|
+
* given URI if serverCertificate is not provided. Can be filled in by
|
|
157
|
+
* advanced DRM config.</i>
|
|
153
158
|
* @property {Array.<!shaka.extern.InitDataOverride>} initData
|
|
154
159
|
* <i>Defaults to [], e.g., no override.</i> <br>
|
|
155
160
|
* A list of initialization data which override any initialization data found
|
|
@@ -328,7 +333,7 @@ shaka.extern.CreateSegmentIndexFunction;
|
|
|
328
333
|
* The Stream's label, unique text that should describe the audio/text track.
|
|
329
334
|
* @property {string} type
|
|
330
335
|
* <i>Required.</i> <br>
|
|
331
|
-
* Content type (e.g. 'video', 'audio' or 'text')
|
|
336
|
+
* Content type (e.g. 'video', 'audio' or 'text', 'image')
|
|
332
337
|
* @property {boolean} primary
|
|
333
338
|
* <i>Defaults to false.</i> <br>
|
|
334
339
|
* True indicates that the player should use this Stream over others if user
|
package/externs/shaka/offline.js
CHANGED
|
@@ -194,6 +194,7 @@ shaka.extern.StreamDB;
|
|
|
194
194
|
* appendWindowStart: number,
|
|
195
195
|
* appendWindowEnd: number,
|
|
196
196
|
* timestampOffset: number,
|
|
197
|
+
* tilesLayout: ?string,
|
|
197
198
|
* dataKey: number
|
|
198
199
|
* }}
|
|
199
200
|
*
|
|
@@ -210,6 +211,10 @@ shaka.extern.StreamDB;
|
|
|
210
211
|
* @property {number} timestampOffset
|
|
211
212
|
* An offset which MediaSource will add to the segment's media timestamps
|
|
212
213
|
* during ingestion, to align to the presentation timeline.
|
|
214
|
+
* @property {?string} tilesLayout
|
|
215
|
+
* The value is a grid-item-dimension consisting of two positive decimal
|
|
216
|
+
* integers in the format: column-x-row ('4x3'). It describes the
|
|
217
|
+
* arrangement of Images in a Grid. The minimum valid LAYOUT is '1x1'.
|
|
213
218
|
* @property {number} dataKey
|
|
214
219
|
* The key to the data in storage.
|
|
215
220
|
*/
|
package/externs/shaka/player.js
CHANGED
|
@@ -516,6 +516,7 @@ shaka.extern.EmsgInfo;
|
|
|
516
516
|
* videoRobustness: string,
|
|
517
517
|
* audioRobustness: string,
|
|
518
518
|
* serverCertificate: Uint8Array,
|
|
519
|
+
* serverCertificateUri: string,
|
|
519
520
|
* individualizationServer: string,
|
|
520
521
|
* sessionType: string
|
|
521
522
|
* }}
|
|
@@ -545,6 +546,10 @@ shaka.extern.EmsgInfo;
|
|
|
545
546
|
* A key-system-specific server certificate used to encrypt license requests.
|
|
546
547
|
* Its use is optional and is meant as an optimization to avoid a round-trip
|
|
547
548
|
* to request a certificate.
|
|
549
|
+
* @property {string} serverCertificateUri
|
|
550
|
+
* <i>Defaults to <code>''</code>.</i><br>
|
|
551
|
+
* If given, will make a request to the given URI to get the server
|
|
552
|
+
* certificate. This is ignored if <code>serverCertificate</code> is set.
|
|
548
553
|
* @property {string} individualizationServer
|
|
549
554
|
* The server that handles an <code>'individualiation-request'</code>. If the
|
|
550
555
|
* server isn't given, it will default to the license server.
|
|
@@ -569,7 +574,8 @@ shaka.extern.AdvancedDrmConfiguration;
|
|
|
569
574
|
* ((function(!Uint8Array, string, ?shaka.extern.DrmInfo):!Uint8Array)|
|
|
570
575
|
* undefined),
|
|
571
576
|
* logLicenseExchange: boolean,
|
|
572
|
-
* updateExpirationTime: number
|
|
577
|
+
* updateExpirationTime: number,
|
|
578
|
+
* preferredKeySystems: !Array.<string>
|
|
573
579
|
* }}
|
|
574
580
|
*
|
|
575
581
|
* @property {shaka.extern.RetryParameters} retryParameters
|
|
@@ -607,6 +613,9 @@ shaka.extern.AdvancedDrmConfiguration;
|
|
|
607
613
|
* @property {number} updateExpirationTime
|
|
608
614
|
* <i>Defaults to 1.</i> <br>
|
|
609
615
|
* The frequency in seconds with which to check the expiration of a session.
|
|
616
|
+
* @property {!Array.<string>} preferredKeySystems
|
|
617
|
+
* <i>Defaults to an empty array. </i> <br>
|
|
618
|
+
* Specifies the priorties of available DRM key systems.
|
|
610
619
|
*
|
|
611
620
|
* @exportDoc
|
|
612
621
|
*/
|
|
@@ -625,7 +634,8 @@ shaka.extern.DrmConfiguration;
|
|
|
625
634
|
* ignoreSuggestedPresentationDelay: boolean,
|
|
626
635
|
* ignoreEmptyAdaptationSet: boolean,
|
|
627
636
|
* ignoreMaxSegmentDuration: boolean,
|
|
628
|
-
* keySystemsByURI: !Object.<string, string
|
|
637
|
+
* keySystemsByURI: !Object.<string, string>,
|
|
638
|
+
* manifestPreprocessor: function(!Element)
|
|
629
639
|
* }}
|
|
630
640
|
*
|
|
631
641
|
* @property {string} clockSyncUri
|
|
@@ -675,6 +685,10 @@ shaka.extern.DrmConfiguration;
|
|
|
675
685
|
* @property {Object.<string, string>} keySystemsByURI
|
|
676
686
|
* A map of scheme URI to key system name. Defaults to default key systems
|
|
677
687
|
* mapping handled by Shaka.
|
|
688
|
+
* @property {function(!Element)} manifestPreprocessor
|
|
689
|
+
* Called immediately after the DASH manifest has been parsed into an
|
|
690
|
+
* XMLDocument. Provides a way for applications to perform efficient
|
|
691
|
+
* preprocessing of the manifest.
|
|
678
692
|
* @exportDoc
|
|
679
693
|
*/
|
|
680
694
|
shaka.extern.DashManifestConfiguration;
|
|
@@ -683,12 +697,16 @@ shaka.extern.DashManifestConfiguration;
|
|
|
683
697
|
/**
|
|
684
698
|
* @typedef {{
|
|
685
699
|
* ignoreTextStreamFailures: boolean,
|
|
700
|
+
* ignoreImageStreamFailures: boolean,
|
|
686
701
|
* useFullSegmentsForStartTime: boolean
|
|
687
702
|
* }}
|
|
688
703
|
*
|
|
689
704
|
* @property {boolean} ignoreTextStreamFailures
|
|
690
705
|
* If <code>true</code>, ignore any errors in a text stream and filter out
|
|
691
706
|
* those streams.
|
|
707
|
+
* @property {boolean} ignoreImageStreamFailures
|
|
708
|
+
* If <code>true</code>, ignore any errors in a image stream and filter out
|
|
709
|
+
* those streams.
|
|
692
710
|
* @property {boolean} useFullSegmentsForStartTime
|
|
693
711
|
* If <code>true</code>, force HlsParser to use a full segment request for
|
|
694
712
|
* determining start time in case the server does not support partial requests
|
|
@@ -771,7 +789,8 @@ shaka.extern.ManifestConfiguration;
|
|
|
771
789
|
* lowLatencyMode: boolean,
|
|
772
790
|
* autoLowLatencyMode: boolean,
|
|
773
791
|
* forceHTTPS: boolean,
|
|
774
|
-
* preferNativeHls: boolean
|
|
792
|
+
* preferNativeHls: boolean,
|
|
793
|
+
* updateIntervalSeconds: number
|
|
775
794
|
* }}
|
|
776
795
|
*
|
|
777
796
|
* @description
|
|
@@ -878,6 +897,8 @@ shaka.extern.ManifestConfiguration;
|
|
|
878
897
|
* If true, if the protocol is HTTP change it to HTTPs.
|
|
879
898
|
* @property {boolean} preferNativeHls
|
|
880
899
|
* If true, prefer native HLS playback when possible, regardless of platform.
|
|
900
|
+
* @property {number} updateIntervalSeconds
|
|
901
|
+
* The minimum number of seconds to see if the manifest has changes.
|
|
881
902
|
*
|
|
882
903
|
* @exportDoc
|
|
883
904
|
*/
|
|
@@ -971,13 +992,15 @@ shaka.extern.OfflineConfiguration;
|
|
|
971
992
|
* preferredTextLanguage: string,
|
|
972
993
|
* preferredVariantRole: string,
|
|
973
994
|
* preferredTextRole: string,
|
|
995
|
+
* preferredVideoCodecs: !Array.<string>,
|
|
996
|
+
* preferredAudioCodecs: !Array.<string>,
|
|
974
997
|
* preferredAudioChannelCount: number,
|
|
998
|
+
* preferredDecodingAttributes: !Array.<string>,
|
|
975
999
|
* preferForcedSubs: boolean,
|
|
976
1000
|
* restrictions: shaka.extern.Restrictions,
|
|
977
1001
|
* playRangeStart: number,
|
|
978
1002
|
* playRangeEnd: number,
|
|
979
|
-
* textDisplayFactory: shaka.extern.TextDisplayer.Factory
|
|
980
|
-
* useMediaCapabilities: boolean
|
|
1003
|
+
* textDisplayFactory: shaka.extern.TextDisplayer.Factory
|
|
981
1004
|
* }}
|
|
982
1005
|
*
|
|
983
1006
|
* @property {shaka.extern.DrmConfiguration} drm
|
|
@@ -1005,8 +1028,15 @@ shaka.extern.OfflineConfiguration;
|
|
|
1005
1028
|
* The preferred role to use for variants.
|
|
1006
1029
|
* @property {string} preferredTextRole
|
|
1007
1030
|
* The preferred role to use for text tracks.
|
|
1031
|
+
* @property {!Array.<string>} preferredVideoCodecs
|
|
1032
|
+
* The list of preferred video codecs, in order of highest to lowest priority.
|
|
1033
|
+
* @property {!Array.<string>} preferredAudioCodecs
|
|
1034
|
+
* The list of preferred audio codecs, in order of highest to lowest priority.
|
|
1008
1035
|
* @property {number} preferredAudioChannelCount
|
|
1009
1036
|
* The preferred number of audio channels.
|
|
1037
|
+
* @property {!Array.<string>} preferredDecodingAttributes
|
|
1038
|
+
* The list of preferred attributes of decodingInfo, in the order of their
|
|
1039
|
+
* priorities.
|
|
1010
1040
|
* @property {boolean} preferForcedSubs
|
|
1011
1041
|
* If true, a forced text track is preferred. Defaults to false.
|
|
1012
1042
|
* If the content has no forced captions and the value is true,
|
|
@@ -1026,10 +1056,6 @@ shaka.extern.OfflineConfiguration;
|
|
|
1026
1056
|
* @property {shaka.extern.TextDisplayer.Factory} textDisplayFactory
|
|
1027
1057
|
* A factory to construct a text displayer. Note that, if this is changed
|
|
1028
1058
|
* during playback, it will cause the text tracks to be reloaded.
|
|
1029
|
-
* @property {boolean} useMediaCapabilities
|
|
1030
|
-
* If true, use MediaCapabilities.decodingInfo() to filter the manifest, and
|
|
1031
|
-
* get MediaKeys information for encrypted content. Default to false.
|
|
1032
|
-
* Shaka Player's integration with MediaCapabilities is now in BETA.
|
|
1033
1059
|
* @exportDoc
|
|
1034
1060
|
*/
|
|
1035
1061
|
shaka.extern.PlayerConfiguration;
|
|
@@ -1083,3 +1109,21 @@ shaka.extern.LanguageRole;
|
|
|
1083
1109
|
* @exportDoc
|
|
1084
1110
|
*/
|
|
1085
1111
|
shaka.extern.Thumbnail;
|
|
1112
|
+
|
|
1113
|
+
|
|
1114
|
+
/**
|
|
1115
|
+
* @typedef {{
|
|
1116
|
+
* title: string,
|
|
1117
|
+
* startTime: number,
|
|
1118
|
+
* endTime: number
|
|
1119
|
+
* }}
|
|
1120
|
+
*
|
|
1121
|
+
* @property {string} title
|
|
1122
|
+
* The title of the chapter.
|
|
1123
|
+
* @property {number} startTime
|
|
1124
|
+
* The time that describes the beginning of the range of the chapter.
|
|
1125
|
+
* @property {number} endTime
|
|
1126
|
+
* The time that describes the end of the range of chapter.
|
|
1127
|
+
* @exportDoc
|
|
1128
|
+
*/
|
|
1129
|
+
shaka.extern.Chapter;
|
package/externs/shaka/text.js
CHANGED
|
@@ -128,7 +128,7 @@ shaka.extern.Cue = class {
|
|
|
128
128
|
/**
|
|
129
129
|
* The text payload of the cue. If nestedCues is non-empty, this should be
|
|
130
130
|
* empty. Top-level block containers should have no payload of their own.
|
|
131
|
-
* @type {
|
|
131
|
+
* @type {string}
|
|
132
132
|
* @exportDoc
|
|
133
133
|
*/
|
|
134
134
|
this.payload;
|
|
@@ -234,14 +234,14 @@ shaka.extern.Cue = class {
|
|
|
234
234
|
|
|
235
235
|
/**
|
|
236
236
|
* Text color as a CSS color, e.g. "#FFFFFF" or "white".
|
|
237
|
-
* @type {
|
|
237
|
+
* @type {string}
|
|
238
238
|
* @exportDoc
|
|
239
239
|
*/
|
|
240
240
|
this.color;
|
|
241
241
|
|
|
242
242
|
/**
|
|
243
243
|
* Text background color as a CSS color, e.g. "#FFFFFF" or "white".
|
|
244
|
-
* @type {
|
|
244
|
+
* @type {string}
|
|
245
245
|
* @exportDoc
|
|
246
246
|
*/
|
|
247
247
|
this.backgroundColor;
|
|
@@ -257,14 +257,14 @@ shaka.extern.Cue = class {
|
|
|
257
257
|
|
|
258
258
|
/**
|
|
259
259
|
* The URL of the background image, e.g. "data:[mime type];base64,[data]".
|
|
260
|
-
* @type {
|
|
260
|
+
* @type {string}
|
|
261
261
|
* @exportDoc
|
|
262
262
|
*/
|
|
263
263
|
this.backgroundImage;
|
|
264
264
|
|
|
265
265
|
/**
|
|
266
266
|
* The border around this cue as a CSS border.
|
|
267
|
-
* @type {
|
|
267
|
+
* @type {string}
|
|
268
268
|
* @exportDoc
|
|
269
269
|
*/
|
|
270
270
|
this.border;
|
|
@@ -292,28 +292,28 @@ shaka.extern.Cue = class {
|
|
|
292
292
|
|
|
293
293
|
/**
|
|
294
294
|
* Text font family.
|
|
295
|
-
* @type {
|
|
295
|
+
* @type {string}
|
|
296
296
|
* @exportDoc
|
|
297
297
|
*/
|
|
298
298
|
this.fontFamily;
|
|
299
299
|
|
|
300
300
|
/**
|
|
301
301
|
* Text letter spacing as a CSS letter-spacing value.
|
|
302
|
-
* @type {
|
|
302
|
+
* @type {string}
|
|
303
303
|
* @exportDoc
|
|
304
304
|
*/
|
|
305
305
|
this.letterSpacing;
|
|
306
306
|
|
|
307
307
|
/**
|
|
308
308
|
* Text line padding as a CSS line-padding value.
|
|
309
|
-
* @type {
|
|
309
|
+
* @type {string}
|
|
310
310
|
* @exportDoc
|
|
311
311
|
*/
|
|
312
312
|
this.linePadding;
|
|
313
313
|
|
|
314
314
|
/**
|
|
315
315
|
* Opacity of the cue element, from 0-1.
|
|
316
|
-
* @type {
|
|
316
|
+
* @type {number}
|
|
317
317
|
* @exportDoc
|
|
318
318
|
*/
|
|
319
319
|
this.opacity;
|
|
@@ -335,7 +335,7 @@ shaka.extern.Cue = class {
|
|
|
335
335
|
|
|
336
336
|
/**
|
|
337
337
|
* Id of the cue.
|
|
338
|
-
* @type {
|
|
338
|
+
* @type {string}
|
|
339
339
|
* @exportDoc
|
|
340
340
|
*/
|
|
341
341
|
this.id;
|
package/externs/texttrack.js
CHANGED
package/karma.conf.js
CHANGED
|
@@ -140,6 +140,7 @@ module.exports = (config) => {
|
|
|
140
140
|
included: false,
|
|
141
141
|
},
|
|
142
142
|
{pattern: 'test/test/assets/*', included: false},
|
|
143
|
+
{pattern: 'test/test/assets/3675/*', included: false},
|
|
143
144
|
{pattern: 'dist/shaka-player.ui.js', included: false},
|
|
144
145
|
{pattern: 'dist/locales.js', included: false},
|
|
145
146
|
{pattern: 'demo/locales/en.json', included: false},
|
package/lib/ads/ad_manager.js
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
goog.provide('shaka.ads.AdManager');
|
|
9
|
-
goog.provide('shaka.ads.CuePoint');
|
|
10
9
|
|
|
11
10
|
goog.require('shaka.Player');
|
|
12
11
|
goog.require('shaka.ads.AdsStats');
|
|
@@ -594,6 +593,22 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
|
|
|
594
593
|
}
|
|
595
594
|
|
|
596
595
|
|
|
596
|
+
/**
|
|
597
|
+
* @return {!Array.<!shaka.extern.AdCuePoint>}
|
|
598
|
+
* @override
|
|
599
|
+
* @export
|
|
600
|
+
*/
|
|
601
|
+
getServerSideCuePoints() {
|
|
602
|
+
if (!this.ssAdManager_) {
|
|
603
|
+
throw new shaka.util.Error(
|
|
604
|
+
shaka.util.Error.Severity.RECOVERABLE,
|
|
605
|
+
shaka.util.Error.Category.ADS,
|
|
606
|
+
shaka.util.Error.Code.SS_AD_MANAGER_NOT_INITIALIZED);
|
|
607
|
+
}
|
|
608
|
+
return this.ssAdManager_.getCuePoints();
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
|
|
597
612
|
/**
|
|
598
613
|
* @return {shaka.extern.AdsStats}
|
|
599
614
|
* @override
|
|
@@ -646,20 +661,6 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
|
|
|
646
661
|
}
|
|
647
662
|
};
|
|
648
663
|
|
|
649
|
-
|
|
650
|
-
shaka.ads.CuePoint = class {
|
|
651
|
-
/**
|
|
652
|
-
* @param {number} start
|
|
653
|
-
* @param {?number=} end
|
|
654
|
-
*/
|
|
655
|
-
constructor(start, end = null) {
|
|
656
|
-
/** @public {number} */
|
|
657
|
-
this.start = start;
|
|
658
|
-
/** @public {?number} */
|
|
659
|
-
this.end = end;
|
|
660
|
-
}
|
|
661
|
-
};
|
|
662
|
-
|
|
663
664
|
/**
|
|
664
665
|
* The event name for when a sequence of ads has been loaded.
|
|
665
666
|
*
|