eyevinn-channel-engine 3.3.8 → 3.3.9
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 +5 -3
- package/package.json +1 -1
package/engine/session.js
CHANGED
|
@@ -521,7 +521,9 @@ class Session {
|
|
|
521
521
|
this.prevMediaSeqOffset.video = playheadState.mediaSeq;
|
|
522
522
|
}
|
|
523
523
|
|
|
524
|
-
if (playheadState.vodMediaSeqVideo > sessionState.vodMediaSeqVideo
|
|
524
|
+
if (playheadState.vodMediaSeqVideo > sessionState.vodMediaSeqVideo ||
|
|
525
|
+
(playheadState.vodMediaSeqVideo < sessionState.vodMediaSeqVideo &&
|
|
526
|
+
playheadState.mediaSeq === this.prevMediaSeqOffset.video)) {
|
|
525
527
|
const state = await this._sessionState.get("state");
|
|
526
528
|
if ([SessionState.VOD_RELOAD_INIT, SessionState.VOD_RELOAD_INITIATING].includes(state)) {
|
|
527
529
|
debug(`[${this._sessionId}]: Recently reloaded Vod. PlayheadState not up-to-date (${playheadState.vodMediaSeqVideo}_${sessionState.vodMediaSeqVideo}). Waiting 500ms before reading from store again`);
|
|
@@ -572,8 +574,8 @@ class Session {
|
|
|
572
574
|
const currentVod = await this._sessionState.getCurrentVod();
|
|
573
575
|
if (currentVod) {
|
|
574
576
|
try {
|
|
575
|
-
|
|
576
577
|
let manifestMseq = playheadState.mediaSeq + playheadState.vodMediaSeqVideo;
|
|
578
|
+
let manifestDseq = sessionState.discSeq + currentVod.discontinuities[playheadState.vodMediaSeqVideo];
|
|
577
579
|
if (currentVod.sequenceAlwaysContainNewSegments) {
|
|
578
580
|
const mediaSequenceValue = currentVod.mediaSequenceValues[playheadState.vodMediaSeqVideo];
|
|
579
581
|
debug(`[${this._sessionId}]: {${mediaSequenceValue}}_{${currentVod.getLastSequenceMediaSequenceValue()}}`);
|
|
@@ -582,7 +584,7 @@ class Session {
|
|
|
582
584
|
|
|
583
585
|
debug(`[${this._sessionId}]: [${playheadState.vodMediaSeqVideo}]_[${currentVod.getLiveMediaSequencesCount()}]`);
|
|
584
586
|
const m3u8 = currentVod.getLiveMediaSequences(playheadState.mediaSeq, bw, playheadState.vodMediaSeqVideo, sessionState.discSeq, this.targetDurationPadding, this.forceTargetDuration);
|
|
585
|
-
debug(`[${this._sessionId}]: [${manifestMseq}][${
|
|
587
|
+
debug(`[${this._sessionId}]: [${manifestMseq}][${manifestDseq}][+${this.targetDurationPadding || 0}] Current media manifest for ${bw} requested`);
|
|
586
588
|
this.prevVodMediaSeq.video = playheadState.vodMediaSeqVideo;
|
|
587
589
|
this.prevMediaSeqOffset.video = playheadState.mediaSeq;
|
|
588
590
|
return m3u8;
|