shaka-player 4.7.12 → 4.8.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/AUTHORS +1 -0
- package/CONTRIBUTORS +1 -0
- package/LICENSE +54 -0
- package/README.md +22 -1
- package/dist/controls.css +1 -1
- package/dist/controls.css.map +1 -1
- package/dist/deps.js +36 -25
- package/dist/locales.js +40 -30
- package/dist/shaka-player.compiled.d.ts +196 -46
- package/dist/shaka-player.compiled.debug.d.ts +196 -46
- package/dist/shaka-player.compiled.debug.externs.js +474 -337
- package/dist/shaka-player.compiled.debug.js +992 -871
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +474 -337
- package/dist/shaka-player.compiled.js +1248 -1174
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +259 -49
- package/dist/shaka-player.ui.debug.d.ts +259 -49
- package/dist/shaka-player.ui.debug.externs.js +591 -376
- package/dist/shaka-player.ui.debug.js +1208 -1003
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +591 -376
- package/dist/shaka-player.ui.js +1533 -1408
- package/dist/shaka-player.ui.map +4 -4
- package/externs/device_sensor_event.js +18 -0
- package/externs/hisense.js +16 -0
- package/externs/playstation.js +31 -0
- package/externs/shaka/abr_manager.js +3 -1
- package/externs/shaka/ads.js +5 -0
- package/externs/shaka/codecs.js +13 -0
- package/externs/shaka/manifest.js +69 -7
- package/externs/shaka/net.js +13 -1
- package/externs/shaka/offline.js +7 -1
- package/externs/shaka/player.js +184 -13
- package/externs/shaka/text.js +19 -0
- package/externs/tizen.js +41 -0
- package/externs/webos.js +19 -0
- package/externs/xbox.js +43 -0
- package/lib/abr/simple_abr_manager.js +9 -1
- package/lib/ads/ad_manager.js +19 -2
- package/lib/ads/client_side_ad_manager.js +5 -3
- package/lib/ads/media_tailor_ad_manager.js +9 -0
- package/lib/cast/cast_receiver.js +0 -14
- package/lib/cast/cast_utils.js +1 -0
- package/lib/cea/mp4_cea_parser.js +6 -1
- package/lib/dash/content_protection.js +97 -53
- package/lib/dash/dash_parser.js +240 -179
- package/lib/dash/mpd_utils.js +72 -65
- package/lib/dash/segment_base.js +35 -22
- package/lib/dash/segment_list.js +39 -31
- package/lib/dash/segment_template.js +47 -23
- package/lib/hls/hls_parser.js +376 -165
- package/lib/media/buffering_observer.js +25 -1
- package/lib/media/drm_engine.js +91 -71
- package/lib/media/manifest_filterer.js +220 -0
- package/lib/media/media_source_engine.js +108 -29
- package/lib/media/playhead.js +3 -3
- package/lib/media/preload_manager.js +827 -0
- package/lib/media/presentation_timeline.js +11 -0
- package/lib/media/segment_index.js +60 -49
- package/lib/media/segment_prefetch.js +140 -43
- package/lib/media/segment_reference.js +31 -8
- package/lib/media/segment_utils.js +208 -25
- package/lib/media/streaming_engine.js +321 -77
- package/lib/mss/content_protection.js +31 -25
- package/lib/mss/mss_parser.js +78 -55
- package/lib/net/networking_engine.js +49 -4
- package/lib/offline/indexeddb/v1_storage_cell.js +2 -0
- package/lib/offline/indexeddb/v2_storage_cell.js +2 -0
- package/lib/offline/manifest_converter.js +10 -3
- package/lib/offline/storage.js +5 -3
- package/lib/player.js +896 -674
- package/lib/polyfill/media_capabilities.js +16 -1
- package/lib/text/simple_text_displayer.js +9 -0
- package/lib/text/stub_text_displayer.js +7 -0
- package/lib/text/text_engine.js +16 -3
- package/lib/text/ttml_text_parser.js +116 -114
- package/lib/text/ui_text_displayer.js +28 -11
- package/lib/text/vtt_text_parser.js +54 -115
- package/lib/transmuxer/opus.js +91 -0
- package/lib/transmuxer/ts_transmuxer.js +115 -0
- package/lib/util/cmcd_manager.js +152 -3
- package/lib/util/dom_utils.js +11 -0
- package/lib/util/error.js +5 -0
- package/lib/util/fake_event.js +2 -0
- package/lib/util/manifest_parser_utils.js +97 -3
- package/lib/util/mime_utils.js +10 -5
- package/lib/util/mp4_box_parsers.js +346 -17
- package/lib/util/mp4_generator.js +23 -0
- package/lib/util/periods.js +24 -37
- package/lib/util/platform.js +161 -9
- package/lib/util/player_configuration.js +61 -3
- package/lib/util/stats.js +16 -0
- package/lib/util/stream_utils.js +350 -277
- package/lib/util/string_utils.js +36 -0
- package/lib/util/tXml.js +814 -0
- package/lib/util/ts_parser.js +50 -0
- package/lib/util/xml_utils.js +10 -338
- package/package.json +2 -2
- package/shaka-player.uncompiled.js +8 -0
- package/ui/controls.js +187 -5
- package/ui/enums.js +2 -0
- package/ui/externs/ui.js +30 -3
- package/ui/gl_matrix/matrix_4x4.js +568 -0
- package/ui/gl_matrix/matrix_quaternion.js +45 -0
- package/ui/less/containers.less +11 -0
- package/ui/locales/en-GB.json +2 -0
- package/ui/locales/en.json +2 -0
- package/ui/locales/es-419.json +2 -0
- package/ui/locales/es.json +2 -0
- package/ui/locales/source.json +8 -0
- package/ui/recenter_vr.js +126 -0
- package/ui/resolution_selection.js +25 -5
- package/ui/statistics_button.js +12 -0
- package/ui/text_selection.js +1 -1
- package/ui/toggle_stereoscopic.js +127 -0
- package/ui/ui.js +74 -38
- package/ui/vr_manager.js +557 -0
- package/ui/vr_utils.js +232 -0
- package/ui/vr_webgl.js +697 -0
|
@@ -14,6 +14,7 @@ goog.require('shaka.media.SegmentIndex');
|
|
|
14
14
|
goog.require('shaka.media.SegmentReference');
|
|
15
15
|
goog.require('shaka.offline.OfflineUri');
|
|
16
16
|
goog.require('shaka.util.ManifestParserUtils');
|
|
17
|
+
goog.require('shaka.util.MimeUtils');
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
/**
|
|
@@ -169,7 +170,7 @@ shaka.offline.ManifestConverter = class {
|
|
|
169
170
|
fromStreamDB_(streamDB, timeline) {
|
|
170
171
|
/** @type {!Array.<!shaka.media.SegmentReference>} */
|
|
171
172
|
const segments = streamDB.segments.map(
|
|
172
|
-
(segment, index) => this.fromSegmentDB_(index, segment));
|
|
173
|
+
(segment, index) => this.fromSegmentDB_(index, segment, streamDB));
|
|
173
174
|
|
|
174
175
|
timeline.notifySegments(segments);
|
|
175
176
|
|
|
@@ -212,6 +213,8 @@ shaka.offline.ManifestConverter = class {
|
|
|
212
213
|
accessibilityPurpose: null,
|
|
213
214
|
external: streamDB.external,
|
|
214
215
|
fastSwitching: streamDB.fastSwitching,
|
|
216
|
+
fullMimeTypes: new Set([shaka.util.MimeUtils.getFullType(
|
|
217
|
+
streamDB.mimeType, streamDB.codecs)]),
|
|
215
218
|
};
|
|
216
219
|
|
|
217
220
|
return stream;
|
|
@@ -220,10 +223,11 @@ shaka.offline.ManifestConverter = class {
|
|
|
220
223
|
/**
|
|
221
224
|
* @param {number} index
|
|
222
225
|
* @param {shaka.extern.SegmentDB} segmentDB
|
|
226
|
+
* @param {shaka.extern.StreamDB} streamDB
|
|
223
227
|
* @return {!shaka.media.SegmentReference}
|
|
224
228
|
* @private
|
|
225
229
|
*/
|
|
226
|
-
fromSegmentDB_(index, segmentDB) {
|
|
230
|
+
fromSegmentDB_(index, segmentDB, streamDB) {
|
|
227
231
|
/** @type {!shaka.offline.OfflineUri} */
|
|
228
232
|
const uri = shaka.offline.OfflineUri.segment(
|
|
229
233
|
this.mechanism_, this.cell_, segmentDB.dataKey);
|
|
@@ -231,7 +235,7 @@ shaka.offline.ManifestConverter = class {
|
|
|
231
235
|
const initSegmentReference = segmentDB.initSegmentKey != null ?
|
|
232
236
|
this.fromInitSegmentDB_(segmentDB.initSegmentKey) : null;
|
|
233
237
|
|
|
234
|
-
|
|
238
|
+
const ref = new shaka.media.SegmentReference(
|
|
235
239
|
segmentDB.startTime,
|
|
236
240
|
segmentDB.endTime,
|
|
237
241
|
() => [uri.toString()],
|
|
@@ -243,6 +247,9 @@ shaka.offline.ManifestConverter = class {
|
|
|
243
247
|
segmentDB.appendWindowEnd,
|
|
244
248
|
/* partialReferences= */ [],
|
|
245
249
|
segmentDB.tilesLayout || '');
|
|
250
|
+
ref.mimeType = segmentDB.mimeType || streamDB.mimeType || '';
|
|
251
|
+
ref.codecs = segmentDB.codecs || streamDB.codecs || '';
|
|
252
|
+
return ref;
|
|
246
253
|
}
|
|
247
254
|
|
|
248
255
|
/**
|
package/lib/offline/storage.js
CHANGED
|
@@ -664,7 +664,8 @@ shaka.offline.Storage = class {
|
|
|
664
664
|
// Filter the manifest based on what we know MediaCapabilities will be able
|
|
665
665
|
// to play later (no point storing something we can't play).
|
|
666
666
|
await shaka.util.StreamUtils.filterManifestByMediaCapabilities(
|
|
667
|
-
drmEngine, manifest, config.offline.usePersistentLicense
|
|
667
|
+
drmEngine, manifest, config.offline.usePersistentLicense,
|
|
668
|
+
config.drm.preferredKeySystems);
|
|
668
669
|
|
|
669
670
|
// Gather all tracks.
|
|
670
671
|
const allTracks = [];
|
|
@@ -1389,6 +1390,8 @@ shaka.offline.Storage = class {
|
|
|
1389
1390
|
tilesLayout: segment.tilesLayout,
|
|
1390
1391
|
pendingSegmentRefId,
|
|
1391
1392
|
dataKey: 0,
|
|
1393
|
+
mimeType: segment.mimeType,
|
|
1394
|
+
codecs: segment.codecs,
|
|
1392
1395
|
};
|
|
1393
1396
|
streamDb.segments.push(segmentDB);
|
|
1394
1397
|
groupId = (groupId + 1) % numberOfParallelDownloads;
|
|
@@ -1654,7 +1657,6 @@ shaka.offline.Storage.defaultSystemIds_ = new Map()
|
|
|
1654
1657
|
.set('com.microsoft.playready.software',
|
|
1655
1658
|
'9a04f07998404286ab92e65be0885f95')
|
|
1656
1659
|
.set('com.microsoft.playready.hardware',
|
|
1657
|
-
'9a04f07998404286ab92e65be0885f95')
|
|
1658
|
-
.set('com.adobe.primetime', 'f239e769efa348509c16a903c6932efb');
|
|
1660
|
+
'9a04f07998404286ab92e65be0885f95');
|
|
1659
1661
|
|
|
1660
1662
|
shaka.Player.registerSupportPlugin('offline', shaka.offline.Storage.support);
|