shaka-player 4.9.6 → 4.9.7

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.
@@ -1793,6 +1793,7 @@ shaka.media.DrmEngine = class {
1793
1793
  'org.w3.clearkey',
1794
1794
  'com.widevine.alpha',
1795
1795
  'com.microsoft.playready',
1796
+ 'com.microsoft.playready.hardware',
1796
1797
  'com.microsoft.playready.recommendation',
1797
1798
  'com.chromecast.playready',
1798
1799
  'com.apple.fps.1_0',
@@ -1815,9 +1816,7 @@ shaka.media.DrmEngine = class {
1815
1816
 
1816
1817
  const testRobustness = {
1817
1818
  'com.widevine.alpha': widevineRobustness,
1818
- 'com.microsoft.playready': playreadyRobustness,
1819
1819
  'com.microsoft.playready.recommendation': playreadyRobustness,
1820
- 'com.chromecast.playready': playreadyRobustness,
1821
1820
  };
1822
1821
 
1823
1822
  const basicVideoCapabilities = [
@@ -110,19 +110,26 @@ shaka.media.SrcEqualsPlayhead = class {
110
110
  // We listen for the loaded-data-event so that we know when we can
111
111
  // interact with |currentTime|.
112
112
  const onLoaded = () => {
113
- if (this.startTime_ == null || this.startTime_ == 0) {
113
+ if (this.startTime_ == null ||
114
+ (this.startTime_ == 0 && this.mediaElement_.duration != Infinity)) {
114
115
  this.started_ = true;
115
116
  } else {
116
- // Startup is complete only when the video element acknowledges the
117
- // seek.
118
- this.eventManager_.listenOnce(this.mediaElement_, 'seeking', () => {
119
- this.started_ = true;
120
- });
121
-
122
117
  const currentTime = this.mediaElement_.currentTime;
118
+ let newTime = this.startTime_;
123
119
  // Using the currentTime allows using a negative number in Live HLS
124
- const newTime = Math.max(0, currentTime + this.startTime_);
125
- this.mediaElement_.currentTime = newTime;
120
+ if (this.startTime_ < 0) {
121
+ newTime = Math.max(0, currentTime + this.startTime_);
122
+ }
123
+ if (currentTime != newTime) {
124
+ // Startup is complete only when the video element acknowledges the
125
+ // seek.
126
+ this.eventManager_.listenOnce(this.mediaElement_, 'seeking', () => {
127
+ this.started_ = true;
128
+ });
129
+ this.mediaElement_.currentTime = newTime;
130
+ } else {
131
+ this.started_ = true;
132
+ }
126
133
  }
127
134
  };
128
135
 
package/lib/player.js CHANGED
@@ -7457,7 +7457,7 @@ shaka.Player.TYPICAL_BUFFERING_THRESHOLD_ = 0.5;
7457
7457
  * @export
7458
7458
  */
7459
7459
  // eslint-disable-next-line no-useless-concat
7460
- shaka.Player.version = 'v4.9.6' + '-uncompiled'; // x-release-please-version
7460
+ shaka.Player.version = 'v4.9.7' + '-uncompiled'; // x-release-please-version
7461
7461
 
7462
7462
  // Initialize the deprecation system using the version string we just set
7463
7463
  // on the player.
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.9.6",
4
+ "version": "4.9.7",
5
5
  "homepage": "https://github.com/shaka-project/shaka-player",
6
6
  "author": "Google",
7
7
  "maintainers": [