rx-player 3.30.1-dev.2023032300 → 3.30.1-dev.2023032301

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## v3.30.1 (2023-03-23)
3
+ ## v3.30.1-dev.2023032301 (2023-03-23)
4
4
 
5
5
  ### Bug fixes
6
6
 
package/VERSION CHANGED
@@ -1 +1 @@
1
- 3.30.1-dev.2023032300
1
+ 3.30.1-dev.2023032301
@@ -70,7 +70,7 @@ export default function loadSession(session, sessionId) {
70
70
  return __generator(this, function (_a) {
71
71
  switch (_a.label) {
72
72
  case 0:
73
- log.info("Compat/DRM: Load persisted session", sessionId);
73
+ log.info("DRM: Load persisted session", sessionId);
74
74
  return [4 /*yield*/, session.load(sessionId)];
75
75
  case 1:
76
76
  isLoaded = _a.sent();
@@ -114,6 +114,7 @@ var PlaybackObserver = /** @class */ (function () {
114
114
  */
115
115
  PlaybackObserver.prototype.setCurrentTime = function (time) {
116
116
  this._internalSeeksIncoming.push(time);
117
+ log.info("API: Seeking internally", time);
117
118
  this._mediaElement.currentTime = time;
118
119
  };
119
120
  /**
@@ -89,7 +89,7 @@ var Player = /** @class */ (function (_super) {
89
89
  // Workaround to support Firefox autoplay on FF 42.
90
90
  // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1194624
91
91
  videoElement.preload = "auto";
92
- _this.version = /* PLAYER_VERSION */ "3.30.1-dev.2023032300";
92
+ _this.version = /* PLAYER_VERSION */ "3.30.1-dev.2023032301";
93
93
  _this.log = log;
94
94
  _this.state = "STOPPED";
95
95
  _this.videoElement = videoElement;
@@ -1165,6 +1165,7 @@ var Player = /** @class */ (function (_super) {
1165
1165
  if (positionWanted === undefined) {
1166
1166
  throw new Error("invalid time given");
1167
1167
  }
1168
+ log.info("API: API Seek to", positionWanted);
1168
1169
  this.videoElement.currentTime = positionWanted;
1169
1170
  return positionWanted;
1170
1171
  };
@@ -2339,5 +2340,5 @@ var Player = /** @class */ (function (_super) {
2339
2340
  };
2340
2341
  return Player;
2341
2342
  }(EventEmitter));
2342
- Player.version = /* PLAYER_VERSION */ "3.30.1-dev.2023032300";
2343
+ Player.version = /* PLAYER_VERSION */ "3.30.1-dev.2023032301";
2343
2344
  export default Player;
@@ -49,6 +49,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
49
49
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
50
50
  }
51
51
  };
52
+ import log from "../../../log";
52
53
  /**
53
54
  * Close sessions from the loadedSessionsStore to allow at maximum `limit`
54
55
  * stored MediaKeySessions in it.
@@ -67,6 +68,7 @@ export default function cleanOldLoadedSessions(loadedSessionsStore, limit) {
67
68
  if (limit < 0 || limit >= loadedSessionsStore.getLength()) {
68
69
  return [2 /*return*/];
69
70
  }
71
+ log.info("DRM: LSS cache limit exceeded", limit, loadedSessionsStore.getLength());
70
72
  proms = [];
71
73
  entries = loadedSessionsStore.getAll().slice();
72
74
  toDelete = entries.length - limit;
@@ -92,6 +92,7 @@ var LoadedSessionsStore = /** @class */ (function () {
92
92
  LoadedSessionsStore.prototype.createSession = function (initData, sessionType) {
93
93
  var _this = this;
94
94
  var keySessionRecord = new KeySessionRecord(initData);
95
+ log.debug("DRM-LSS: calling `createSession`", sessionType);
95
96
  var mediaKeySession = this._mediaKeys.createSession(sessionType);
96
97
  var entry = { mediaKeySession: mediaKeySession, sessionType: sessionType, keySessionRecord: keySessionRecord, isGeneratingRequest: false,
97
98
  isLoadingPersistentSession: false,
@@ -99,6 +100,7 @@ var LoadedSessionsStore = /** @class */ (function () {
99
100
  if (!isNullOrUndefined(mediaKeySession.closed)) {
100
101
  mediaKeySession.closed
101
102
  .then(function () {
103
+ log.info("DRM-LSS: session was closed, removing it.", mediaKeySession.sessionId);
102
104
  var index = _this.getIndex(keySessionRecord);
103
105
  if (index >= 0 &&
104
106
  _this._storage[index].mediaKeySession === mediaKeySession) {
@@ -110,8 +112,8 @@ var LoadedSessionsStore = /** @class */ (function () {
110
112
  log.warn("DRM-LSS: MediaKeySession.closed rejected: ".concat(e));
111
113
  });
112
114
  }
113
- log.debug("DRM-LSS: Add MediaKeySession", entry.sessionType);
114
115
  this._storage.push(__assign({}, entry));
116
+ log.debug("DRM-LSS: MediaKeySession added", entry.sessionType, this._storage.length);
115
117
  return entry;
116
118
  };
117
119
  /**
@@ -132,6 +134,7 @@ var LoadedSessionsStore = /** @class */ (function () {
132
134
  if (stored.keySessionRecord.isCompatibleWith(initializationData)) {
133
135
  this._storage.splice(i, 1);
134
136
  this._storage.push(stored);
137
+ log.debug("DRM-LSS: Reusing session:", stored.mediaKeySession.sessionId, stored.sessionType);
135
138
  return __assign({}, stored);
136
139
  }
137
140
  }
@@ -365,6 +368,7 @@ var LoadedSessionsStore = /** @class */ (function () {
365
368
  for (var i = this._storage.length - 1; i >= 0; i--) {
366
369
  var stored = this._storage[i];
367
370
  if (stored.mediaKeySession === mediaKeySession) {
371
+ log.debug("DRM-LSS: Removing session without closing it", mediaKeySession.sessionId);
368
372
  this._storage.splice(i, 1);
369
373
  return true;
370
374
  }
@@ -518,7 +518,6 @@ var MediaSourceContentInitializer = /** @class */ (function (_super) {
518
518
  _this.trigger("activePeriodChanged", { period: period });
519
519
  });
520
520
  contentTimeBoundariesObserver.addEventListener("durationUpdate", function (newDuration) {
521
- log.debug("Init: Duration has to be updated.", newDuration);
522
521
  mediaDurationUpdater.updateKnownDuration(newDuration);
523
522
  });
524
523
  contentTimeBoundariesObserver.addEventListener("endOfStream", function () {
package/dist/rx-player.js CHANGED
@@ -4515,6 +4515,7 @@ function _createAndTryToRetrievePersistentSession() {
4515
4515
  * See the License for the specific language governing permissions and
4516
4516
  * limitations under the License.
4517
4517
  */
4518
+
4518
4519
  /**
4519
4520
  * Close sessions from the loadedSessionsStore to allow at maximum `limit`
4520
4521
  * stored MediaKeySessions in it.
@@ -4540,6 +4541,7 @@ function _cleanOldLoadedSessions() {
4540
4541
  }
4541
4542
  return _context.abrupt("return");
4542
4543
  case 2:
4544
+ log/* default.info */.Z.info("DRM: LSS cache limit exceeded", limit, loadedSessionsStore.getLength());
4543
4545
  proms = [];
4544
4546
  entries = loadedSessionsStore.getAll().slice(); // clone
4545
4547
  toDelete = entries.length - limit;
@@ -4547,9 +4549,9 @@ function _cleanOldLoadedSessions() {
4547
4549
  entry = entries[i];
4548
4550
  proms.push(loadedSessionsStore.closeSession(entry.mediaKeySession));
4549
4551
  }
4550
- _context.next = 8;
4552
+ _context.next = 9;
4551
4553
  return Promise.all(proms);
4552
- case 8:
4554
+ case 9:
4553
4555
  case "end":
4554
4556
  return _context.stop();
4555
4557
  }
@@ -5217,7 +5219,7 @@ function _loadSession() {
5217
5219
  while (1) {
5218
5220
  switch (_context.prev = _context.next) {
5219
5221
  case 0:
5220
- log/* default.info */.Z.info("Compat/DRM: Load persisted session", sessionId);
5222
+ log/* default.info */.Z.info("DRM: Load persisted session", sessionId);
5221
5223
  _context.next = 3;
5222
5224
  return session.load(sessionId);
5223
5225
  case 3:
@@ -5705,6 +5707,7 @@ var LoadedSessionsStore = /*#__PURE__*/function () {
5705
5707
  _proto.createSession = function createSession(initData, sessionType) {
5706
5708
  var _this = this;
5707
5709
  var keySessionRecord = new KeySessionRecord(initData);
5710
+ log/* default.debug */.Z.debug("DRM-LSS: calling `createSession`", sessionType);
5708
5711
  var mediaKeySession = this._mediaKeys.createSession(sessionType);
5709
5712
  var entry = {
5710
5713
  mediaKeySession: mediaKeySession,
@@ -5718,6 +5721,7 @@ var LoadedSessionsStore = /*#__PURE__*/function () {
5718
5721
  };
5719
5722
  if (!(0,is_null_or_undefined/* default */.Z)(mediaKeySession.closed)) {
5720
5723
  mediaKeySession.closed.then(function () {
5724
+ log/* default.info */.Z.info("DRM-LSS: session was closed, removing it.", mediaKeySession.sessionId);
5721
5725
  var index = _this.getIndex(keySessionRecord);
5722
5726
  if (index >= 0 && _this._storage[index].mediaKeySession === mediaKeySession) {
5723
5727
  _this._storage.splice(index, 1);
@@ -5727,8 +5731,8 @@ var LoadedSessionsStore = /*#__PURE__*/function () {
5727
5731
  log/* default.warn */.Z.warn("DRM-LSS: MediaKeySession.closed rejected: " + e);
5728
5732
  });
5729
5733
  }
5730
- log/* default.debug */.Z.debug("DRM-LSS: Add MediaKeySession", entry.sessionType);
5731
5734
  this._storage.push(Object.assign({}, entry));
5735
+ log/* default.debug */.Z.debug("DRM-LSS: MediaKeySession added", entry.sessionType, this._storage.length);
5732
5736
  return entry;
5733
5737
  }
5734
5738
  /**
@@ -5749,6 +5753,7 @@ var LoadedSessionsStore = /*#__PURE__*/function () {
5749
5753
  if (stored.keySessionRecord.isCompatibleWith(initializationData)) {
5750
5754
  this._storage.splice(i, 1);
5751
5755
  this._storage.push(stored);
5756
+ log/* default.debug */.Z.debug("DRM-LSS: Reusing session:", stored.mediaKeySession.sessionId, stored.sessionType);
5752
5757
  return Object.assign({}, stored);
5753
5758
  }
5754
5759
  }
@@ -6086,6 +6091,7 @@ var LoadedSessionsStore = /*#__PURE__*/function () {
6086
6091
  for (var i = this._storage.length - 1; i >= 0; i--) {
6087
6092
  var stored = this._storage[i];
6088
6093
  if (stored.mediaKeySession === mediaKeySession) {
6094
+ log/* default.debug */.Z.debug("DRM-LSS: Removing session without closing it", mediaKeySession.sessionId);
6089
6095
  this._storage.splice(i, 1);
6090
6096
  return true;
6091
6097
  }
@@ -49614,7 +49620,6 @@ var MediaSourceContentInitializer = /*#__PURE__*/function (_ContentInitializer)
49614
49620
  });
49615
49621
  });
49616
49622
  contentTimeBoundariesObserver.addEventListener("durationUpdate", function (newDuration) {
49617
- log/* default.debug */.Z.debug("Init: Duration has to be updated.", newDuration);
49618
49623
  mediaDurationUpdater.updateKnownDuration(newDuration);
49619
49624
  });
49620
49625
  contentTimeBoundariesObserver.addEventListener("endOfStream", function () {
@@ -50229,6 +50234,7 @@ var PlaybackObserver = /*#__PURE__*/function () {
50229
50234
  */;
50230
50235
  _proto.setCurrentTime = function setCurrentTime(time) {
50231
50236
  this._internalSeeksIncoming.push(time);
50237
+ log/* default.info */.Z.info("API: Seeking internally", time);
50232
50238
  this._mediaElement.currentTime = time;
50233
50239
  }
50234
50240
  /**
@@ -52020,7 +52026,7 @@ var Player = /*#__PURE__*/function (_EventEmitter) {
52020
52026
  // Workaround to support Firefox autoplay on FF 42.
52021
52027
  // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1194624
52022
52028
  videoElement.preload = "auto";
52023
- _this.version = /* PLAYER_VERSION */"3.30.1-dev.2023032300";
52029
+ _this.version = /* PLAYER_VERSION */"3.30.1-dev.2023032301";
52024
52030
  _this.log = log/* default */.Z;
52025
52031
  _this.state = "STOPPED";
52026
52032
  _this.videoElement = videoElement;
@@ -53123,6 +53129,7 @@ var Player = /*#__PURE__*/function (_EventEmitter) {
53123
53129
  if (positionWanted === undefined) {
53124
53130
  throw new Error("invalid time given");
53125
53131
  }
53132
+ log/* default.info */.Z.info("API: API Seek to", positionWanted);
53126
53133
  this.videoElement.currentTime = positionWanted;
53127
53134
  return positionWanted;
53128
53135
  }
@@ -54335,7 +54342,7 @@ var Player = /*#__PURE__*/function (_EventEmitter) {
54335
54342
  }]);
54336
54343
  return Player;
54337
54344
  }(event_emitter/* default */.Z);
54338
- Player.version = /* PLAYER_VERSION */"3.30.1-dev.2023032300";
54345
+ Player.version = /* PLAYER_VERSION */"3.30.1-dev.2023032301";
54339
54346
  /* harmony default export */ var public_api = (Player);
54340
54347
  ;// CONCATENATED MODULE: ./src/core/api/index.ts
54341
54348
  /**