eyevinn-channel-engine 3.2.6 → 3.2.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.
- package/engine/session.js +11 -2
- package/package.json +1 -1
package/engine/session.js
CHANGED
|
@@ -361,9 +361,13 @@ class Session {
|
|
|
361
361
|
state = await this.getSessionState();
|
|
362
362
|
}
|
|
363
363
|
|
|
364
|
-
const playheadState =
|
|
365
|
-
|
|
364
|
+
const playheadState = {
|
|
365
|
+
vodMediaSeqVideo: null
|
|
366
|
+
}
|
|
367
|
+
if (opts && opts.targetMseq !== undefined) {
|
|
366
368
|
playheadState.vodMediaSeqVideo = opts.targetMseq;
|
|
369
|
+
} else {
|
|
370
|
+
playheadState.vodMediaSeqVideo = await this._playheadState.get("vodMediaSeqVideo");
|
|
367
371
|
}
|
|
368
372
|
|
|
369
373
|
// NOTE: Assume that VOD cache was already cleared in 'getCurrentMediaAndDiscSequenceCount()'
|
|
@@ -566,6 +570,7 @@ class Session {
|
|
|
566
570
|
} else {
|
|
567
571
|
debug(`[${this._sessionId}]: We don't have any previously generated m3u8`);
|
|
568
572
|
}
|
|
573
|
+
this.isAllowedToClearVodCache = true;
|
|
569
574
|
}
|
|
570
575
|
} else {
|
|
571
576
|
sessionState.vodMediaSeqVideo = await this._sessionState.increment("vodMediaSeqVideo");
|
|
@@ -1065,6 +1070,8 @@ class Session {
|
|
|
1065
1070
|
debug(`[${this._sessionId}]: not a leader so will go directly to state VOD_NEXT_INITIATING`);
|
|
1066
1071
|
this.waitingForNextVod = true;
|
|
1067
1072
|
sessionState.state = await this._sessionState.set("state", SessionState.VOD_NEXT_INITIATING);
|
|
1073
|
+
// Allow Leader|Follower to clear vodCache...
|
|
1074
|
+
this.isAllowedToClearVodCache = true;
|
|
1068
1075
|
sessionState.currentVod = await this._sessionState.getCurrentVod();
|
|
1069
1076
|
}
|
|
1070
1077
|
} catch (err) {
|
|
@@ -1081,6 +1088,8 @@ class Session {
|
|
|
1081
1088
|
debug("No slate to load");
|
|
1082
1089
|
throw err;
|
|
1083
1090
|
}
|
|
1091
|
+
// Allow Leader|Follower to clear vodCache...
|
|
1092
|
+
this.isAllowedToClearVodCache = true;
|
|
1084
1093
|
}
|
|
1085
1094
|
break;
|
|
1086
1095
|
case SessionState.VOD_RELOAD_INIT:
|