shaka-player 4.12.7 → 4.12.8

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.
@@ -1800,10 +1800,12 @@ shaka.extern.LiveSyncConfiguration;
1800
1800
  * <br>
1801
1801
  * Defaults to <code>0.5</code>.
1802
1802
  * @property {boolean} infiniteLiveStreamDuration
1803
- * If <code>true</code>, the media source live duration
1804
- * set as a<code>Infinity</code>
1803
+ * If <code>true</code>, the media source duration of livestreams will be set
1804
+ * to <code>Infinity</code>. Otherwise, it will be set to a high but
1805
+ * non-infinite number (2^32).
1805
1806
  * <br>
1806
- * Defaults to <code>false</code>.
1807
+ * Defaults to <code>false</code> except on Safari 17 or above whose default
1808
+ * value is <code>true</code>.
1807
1809
  * @property {number} preloadNextUrlWindow
1808
1810
  * The window of time at the end of the presentation to begin preloading the
1809
1811
  * next URL, such as one specified by a urn:mpeg:dash:chaining:2016 element
@@ -695,10 +695,11 @@ shaka.dash.DashParser = class {
695
695
  // that the complex logic of multi-Period eviction and period-flattening
696
696
  // is correct. See also:
697
697
  // https://github.com/shaka-project/shaka-player/issues/3169#issuecomment-823580634
698
+ const availabilityStart =
699
+ presentationTimeline.getSegmentAvailabilityStart();
698
700
  for (const stream of Object.values(this.streamMap_)) {
699
701
  if (stream.segmentIndex) {
700
- stream.segmentIndex.evict(
701
- presentationTimeline.getSegmentAvailabilityStart());
702
+ stream.segmentIndex.evict(availabilityStart);
702
703
  }
703
704
  }
704
705
  } else {
@@ -314,4 +314,5 @@ shaka.hls.ManifestTextParser.SEGMENT_TAGS = [
314
314
  'EXT-X-DATERANGE',
315
315
  'EXT-X-MAP',
316
316
  'EXT-X-GAP',
317
+ 'EXT-X-TILES',
317
318
  ];
@@ -2344,7 +2344,7 @@ shaka.media.StreamingEngine = class {
2344
2344
  const segmentIndex = mediaState.stream.segmentIndex;
2345
2345
  if (segmentIndex instanceof shaka.media.MetaSegmentIndex) {
2346
2346
  segmentIndex.evict(
2347
- this.manifest_.presentationTimeline.getSeekRangeStart());
2347
+ this.manifest_.presentationTimeline.getSegmentAvailabilityStart());
2348
2348
  }
2349
2349
 
2350
2350
  const logPrefix = shaka.media.StreamingEngine.logPrefix_(mediaState);
@@ -88,6 +88,7 @@ shaka.net.NetworkingUtils.EXTENSIONS_TO_MIME_TYPES_ = {
88
88
  'ogg': 'audio/ogg',
89
89
  'mpg': 'video/mpeg',
90
90
  'mpeg': 'video/mpeg',
91
+ 'mov': 'video/quicktime',
91
92
  'm3u8': 'application/x-mpegurl',
92
93
  'mpd': 'application/dash+xml',
93
94
  'ism': 'application/vnd.ms-sstr+xml',
package/lib/player.js CHANGED
@@ -8256,7 +8256,8 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
8256
8256
  if (!this.video_ || this.video_.ended) {
8257
8257
  return true;
8258
8258
  }
8259
- return this.video_.currentTime >= this.seekRange().end;
8259
+ return this.fullyLoaded_ && !this.isLive() &&
8260
+ this.video_.currentTime >= this.seekRange().end;
8260
8261
  }
8261
8262
  };
8262
8263
 
@@ -8299,7 +8300,7 @@ shaka.Player.TYPICAL_BUFFERING_THRESHOLD_ = 0.5;
8299
8300
  * @export
8300
8301
  */
8301
8302
  // eslint-disable-next-line no-useless-concat, max-len
8302
- shaka.Player.version = 'v4.12.7' + '-uncompiled'; // x-release-please-version
8303
+ shaka.Player.version = 'v4.12.8' + '-uncompiled'; // x-release-please-version
8303
8304
 
8304
8305
  // Initialize the deprecation system using the version string we just set
8305
8306
  // on the player.
@@ -276,6 +276,11 @@ shaka.util.PlayerConfiguration = class {
276
276
  shaka.util.Platform.isTizen(),
277
277
  };
278
278
 
279
+ const safariVersion = shaka.util.Platform.safariVersion();
280
+ if (safariVersion && safariVersion >= 17) {
281
+ streaming.infiniteLiveStreamDuration = true;
282
+ }
283
+
279
284
  // WebOS, Tizen, Chromecast and Hisense have long hardware pipelines
280
285
  // that respond slowly to seeking.
281
286
  // Therefore we should not seek when we detect a stall
@@ -538,7 +543,13 @@ shaka.util.PlayerConfiguration = class {
538
543
  if (hdrLevel == 'AUTO') {
539
544
  // Auto detect the ideal HDR level.
540
545
  if (window.matchMedia('(color-gamut: p3)').matches) {
541
- hdrLevel = 'PQ';
546
+ const someHLG = tracks.some((track) => {
547
+ if (track.hdr && track.hdr == 'HLG') {
548
+ return true;
549
+ }
550
+ return false;
551
+ });
552
+ hdrLevel = someHLG ? 'HLG' : 'PQ';
542
553
  } else {
543
554
  hdrLevel = 'SDR';
544
555
  }
package/lib/util/tXml.js CHANGED
@@ -556,8 +556,9 @@ shaka.util.TXml = class {
556
556
  const schemaNS = shaka.util.TXml.getKnownNameSpace(ns);
557
557
  const found = [];
558
558
  if (elem.children) {
559
+ const tagName = schemaNS ? `${schemaNS}:${name}` : name;
559
560
  for (const child of elem.children) {
560
- if (child && child.tagName === `${schemaNS}:${name}`) {
561
+ if (child && child.tagName === tagName) {
561
562
  found.push(child);
562
563
  }
563
564
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shaka-player",
3
3
  "description": "DASH/EME video player library",
4
- "version": "4.12.7",
4
+ "version": "4.12.8",
5
5
  "homepage": "https://github.com/shaka-project/shaka-player",
6
6
  "author": "Google",
7
7
  "maintainers": [
@@ -100,6 +100,7 @@
100
100
  },
101
101
  "license": "Apache-2.0",
102
102
  "scripts": {
103
+ "build": "python build/all.py",
103
104
  "prepack": "clean-package",
104
105
  "postpack": "clean-package restore",
105
106
  "prepublishOnly": "python build/checkversion.py && python build/all.py --force"
package/ui/controls.js CHANGED
@@ -1815,12 +1815,8 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget {
1815
1815
  goog.asserts.assert(
1816
1816
  this.seekBar_, 'Caller of seek_ must check for seekBar_ first!');
1817
1817
 
1818
- this.seekBar_.changeTo(currentTime);
1819
-
1820
- if (this.isOpaque()) {
1821
- // Only update the time and seek range if it's visible.
1822
- this.updateTimeAndSeekRange_();
1823
- }
1818
+ this.video_.currentTime = currentTime;
1819
+ this.updateTimeAndSeekRange_();
1824
1820
  }
1825
1821
 
1826
1822
  /**
@@ -61,7 +61,6 @@ shaka.ui.RangeElement = class extends shaka.ui.Element {
61
61
  this.bar.classList.add('shaka-range-element');
62
62
  this.bar.classList.add(...barClassNames);
63
63
  this.bar.type = 'range';
64
- // TODO(#2027): step=any causes keyboard nav problems on IE 11.
65
64
  this.bar.step = 'any';
66
65
  this.bar.min = '0';
67
66
  this.bar.max = '1';