eyevinn-channel-engine 3.1.0 → 3.1.1

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/engine/session.js CHANGED
@@ -395,7 +395,7 @@ class Session {
395
395
  if (!this._sessionState) {
396
396
  throw new Error('Session not ready');
397
397
  }
398
- const sessionState = await this._sessionState.getValues(["discSeq", "vodMediaSeqVideo"]);
398
+ const sessionState = await this._sessionState.getValues(["mediaSeq", "discSeq", "vodMediaSeqVideo"]);
399
399
  const playheadState = await this._playheadState.getValues(["mediaSeq", "vodMediaSeqVideo"]);
400
400
 
401
401
  /*
@@ -405,6 +405,7 @@ class Session {
405
405
  */
406
406
  if (playheadState.vodMediaSeqVideo > sessionState.vodMediaSeqVideo) {
407
407
  playheadState.vodMediaSeqVideo = sessionState.vodMediaSeqVideo;
408
+ playheadState.mediaSeq = sessionState.mediaSeq;
408
409
  }
409
410
 
410
411
  if (playheadState.vodMediaSeqVideo === 0 || this.waitingForNextVod) {
@@ -645,7 +645,9 @@ class SessionLive {
645
645
  if (Object.keys(this.liveSegQueue).length > 0) {
646
646
  const firstBw = Object.keys(this.liveSegQueue)[0];
647
647
  const lastIdx = this.liveSegQueue[firstBw].length - 1;
648
- retryDelayMs = this.liveSegQueue[firstBw][lastIdx].duration * 1000 * 0.25;
648
+ if (this.liveSegQueue[firstBw][lastIdx].duration) {
649
+ retryDelayMs = this.liveSegQueue[firstBw][lastIdx].duration * 1000 * 0.25;
650
+ }
649
651
  }
650
652
  // Wait a little before trying again
651
653
  debug(`[${this.sessionId}]: ALERT! Live Source Data NOT in sync! Will try again after ${retryDelayMs}ms`);
@@ -779,7 +781,8 @@ class SessionLive {
779
781
  await allSettled(pushPromises);
780
782
 
781
783
  // UPDATE COUNTS, & Shift Segments in vodSegments and liveSegQueue if needed.
782
- const newTotalDuration = this._incrementAndShift("LEADER");
784
+ const leaderORFollower = isLeader ? "LEADER" : "NEW FOLLOWER";
785
+ const newTotalDuration = this._incrementAndShift(leaderORFollower);
783
786
  if (newTotalDuration) {
784
787
  debug(`[${this.sessionId}]: New Adjusted Playlist Duration=${newTotalDuration}s`);
785
788
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eyevinn-channel-engine",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "description": "OTT TV Channel Engine",
5
5
  "main": "index.js",
6
6
  "scripts": {