shaka-player 3.2.8 → 3.2.9

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.
@@ -2562,12 +2562,16 @@ shaka.hls.HlsParser = class {
2562
2562
  const ContentType = shaka.util.ManifestParserUtils.ContentType;
2563
2563
  const requestType = shaka.net.NetworkingEngine.RequestType.SEGMENT;
2564
2564
 
2565
+ // If you wait long enough, requesting the first segment can fail
2566
+ // because it has fallen off the left edge of DVR, so to be safer,
2567
+ // let's request the middle segment.
2565
2568
  goog.asserts.assert(playlist.segments.length,
2566
2569
  'Playlist should have segments!');
2567
- const firstSegmentUri = this.variableSubstitution_(
2568
- playlist.segments[0].absoluteUri, variables);
2570
+ const middleSegmentIdx = Math.trunc((playlist.segments.length - 1) / 2);
2571
+ const middleSegmentUri = this.variableSubstitution_(
2572
+ playlist.segments[middleSegmentIdx].absoluteUri, variables);
2569
2573
 
2570
- const parsedUri = new goog.Uri(firstSegmentUri);
2574
+ const parsedUri = new goog.Uri(middleSegmentUri);
2571
2575
  const extension = parsedUri.getPath().split('.').pop();
2572
2576
  const map = HlsParser.EXTENSION_MAP_BY_CONTENT_TYPE_[contentType];
2573
2577
 
@@ -2598,7 +2602,7 @@ shaka.hls.HlsParser = class {
2598
2602
  // If unable to guess mime type, request a segment and try getting it
2599
2603
  // from the response.
2600
2604
  const headRequest = shaka.net.NetworkingEngine.makeRequest(
2601
- [firstSegmentUri], this.config_.retryParameters);
2605
+ [middleSegmentUri], this.config_.retryParameters);
2602
2606
  headRequest.method = 'HEAD';
2603
2607
 
2604
2608
  const response = await this.makeNetworkRequest_(
package/lib/player.js CHANGED
@@ -6430,7 +6430,7 @@ shaka.Player.TYPICAL_BUFFERING_THRESHOLD_ = 0.5;
6430
6430
  * @define {string} A version number taken from git at compile time.
6431
6431
  * @export
6432
6432
  */
6433
- shaka.Player.version = 'v3.2.8-uncompiled';
6433
+ shaka.Player.version = 'v3.2.9-uncompiled';
6434
6434
 
6435
6435
  // Initialize the deprecation system using the version string we just set
6436
6436
  // on the player.
@@ -981,6 +981,7 @@ shaka.util.StreamUtils = class {
981
981
  track.channelsCount = audio.channelsCount;
982
982
  track.audioSamplingRate = audio.audioSamplingRate;
983
983
  track.audioBandwidth = audio.bandwidth || null;
984
+ track.spatialAudio = audio.spatialAudio;
984
985
  track.label = audio.label;
985
986
  track.audioRoles = audio.roles;
986
987
  }
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": "3.2.8",
4
+ "version": "3.2.9",
5
5
  "homepage": "https://github.com/shaka-project/shaka-player",
6
6
  "author": "Google",
7
7
  "maintainers": [
@@ -96,6 +96,9 @@
96
96
  "prepublishOnly": "python build/checkversion.py && python build/all.py --force"
97
97
  },
98
98
  "dependencies": {
99
- "eme-encryption-scheme-polyfill": "^2.0.3"
99
+ "eme-encryption-scheme-polyfill": "^2.0.5"
100
+ },
101
+ "engines": {
102
+ "node": ">=14"
100
103
  }
101
104
  }