rx-player 3.28.0-dev.2022062000 → 3.28.0-dev.2022062300

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/VERSION CHANGED
@@ -1 +1 @@
1
- 3.28.0-dev.2022062000
1
+ 3.28.0-dev.2022062300
@@ -693,11 +693,6 @@ declare class Player extends EventEmitter<IPublicAPIEvent> {
693
693
  * @param {Error} error
694
694
  */
695
695
  private _priv_onPlaybackError;
696
- /**
697
- * Triggered when the playback Observable completes.
698
- * Clean-up ressources and signal that the content has ended.
699
- */
700
- private _priv_onPlaybackFinished;
701
696
  /**
702
697
  * Triggered when we received a warning event during playback.
703
698
  * Trigger the right API event.
@@ -88,7 +88,7 @@ var Player = /** @class */ (function (_super) {
88
88
  // Workaround to support Firefox autoplay on FF 42.
89
89
  // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1194624
90
90
  videoElement.preload = "auto";
91
- _this.version = /* PLAYER_VERSION */ "3.28.0-dev.2022062000";
91
+ _this.version = /* PLAYER_VERSION */ "3.28.0-dev.2022062300";
92
92
  _this.log = log;
93
93
  _this.state = "STOPPED";
94
94
  _this.videoElement = videoElement;
@@ -598,7 +598,14 @@ var Player = /** @class */ (function (_super) {
598
598
  playback$.subscribe({
599
599
  next: function (x) { return _this._priv_onPlaybackEvent(x); },
600
600
  error: function (err) { return _this._priv_onPlaybackError(err); },
601
- complete: function () { return _this._priv_onPlaybackFinished(); },
601
+ complete: function () {
602
+ if (!contentInfos.currentContentCanceller.isUsed) {
603
+ log.info("API: Previous playback finished. Stopping and cleaning-up...");
604
+ contentInfos.currentContentCanceller.cancel();
605
+ _this._priv_cleanUpCurrentContentState();
606
+ _this._priv_setPlayerState(PLAYER_STATES.STOPPED);
607
+ }
608
+ },
602
609
  });
603
610
  // initialize the content only when the lock is inactive
604
611
  this._priv_contentLock.asObservable()
@@ -1878,18 +1885,6 @@ var Player = /** @class */ (function (_super) {
1878
1885
  this.trigger("error", formattedError);
1879
1886
  }
1880
1887
  };
1881
- /**
1882
- * Triggered when the playback Observable completes.
1883
- * Clean-up ressources and signal that the content has ended.
1884
- */
1885
- Player.prototype._priv_onPlaybackFinished = function () {
1886
- log.info("API: Previous playback finished. Stopping and cleaning-up...");
1887
- if (this._priv_contentInfos !== null) {
1888
- this._priv_contentInfos.currentContentCanceller.cancel();
1889
- }
1890
- this._priv_cleanUpCurrentContentState();
1891
- this._priv_setPlayerState(PLAYER_STATES.ENDED);
1892
- };
1893
1888
  /**
1894
1889
  * Triggered when we received a warning event during playback.
1895
1890
  * Trigger the right API event.
@@ -2295,5 +2290,5 @@ var Player = /** @class */ (function (_super) {
2295
2290
  };
2296
2291
  return Player;
2297
2292
  }(EventEmitter));
2298
- Player.version = /* PLAYER_VERSION */ "3.28.0-dev.2022062000";
2293
+ Player.version = /* PLAYER_VERSION */ "3.28.0-dev.2022062300";
2299
2294
  export default Player;
package/dist/rx-player.js CHANGED
@@ -61240,7 +61240,7 @@ var Player = /*#__PURE__*/function (_EventEmitter) {
61240
61240
  videoElement.preload = "auto";
61241
61241
  _this.version =
61242
61242
  /* PLAYER_VERSION */
61243
- "3.28.0-dev.2022062000";
61243
+ "3.28.0-dev.2022062300";
61244
61244
  _this.log = log/* default */.Z;
61245
61245
  _this.state = "STOPPED";
61246
61246
  _this.videoElement = videoElement;
@@ -61870,7 +61870,14 @@ var Player = /*#__PURE__*/function (_EventEmitter) {
61870
61870
  return _this2._priv_onPlaybackError(err);
61871
61871
  },
61872
61872
  complete: function complete() {
61873
- return _this2._priv_onPlaybackFinished();
61873
+ if (!contentInfos.currentContentCanceller.isUsed) {
61874
+ log/* default.info */.Z.info("API: Previous playback finished. Stopping and cleaning-up...");
61875
+ contentInfos.currentContentCanceller.cancel();
61876
+
61877
+ _this2._priv_cleanUpCurrentContentState();
61878
+
61879
+ _this2._priv_setPlayerState(PLAYER_STATES.STOPPED);
61880
+ }
61874
61881
  }
61875
61882
  }); // initialize the content only when the lock is inactive
61876
61883
 
@@ -63502,23 +63509,6 @@ var Player = /*#__PURE__*/function (_EventEmitter) {
63502
63509
  this.trigger("error", formattedError);
63503
63510
  }
63504
63511
  }
63505
- /**
63506
- * Triggered when the playback Observable completes.
63507
- * Clean-up ressources and signal that the content has ended.
63508
- */
63509
- ;
63510
-
63511
- _proto._priv_onPlaybackFinished = function _priv_onPlaybackFinished() {
63512
- log/* default.info */.Z.info("API: Previous playback finished. Stopping and cleaning-up...");
63513
-
63514
- if (this._priv_contentInfos !== null) {
63515
- this._priv_contentInfos.currentContentCanceller.cancel();
63516
- }
63517
-
63518
- this._priv_cleanUpCurrentContentState();
63519
-
63520
- this._priv_setPlayerState(PLAYER_STATES.ENDED);
63521
- }
63522
63512
  /**
63523
63513
  * Triggered when we received a warning event during playback.
63524
63514
  * Trigger the right API event.
@@ -64065,7 +64055,7 @@ var Player = /*#__PURE__*/function (_EventEmitter) {
64065
64055
 
64066
64056
  Player.version =
64067
64057
  /* PLAYER_VERSION */
64068
- "3.28.0-dev.2022062000";
64058
+ "3.28.0-dev.2022062300";
64069
64059
  /* harmony default export */ var public_api = (Player);
64070
64060
  ;// CONCATENATED MODULE: ./src/core/api/index.ts
64071
64061
  /**