eyevinn-channel-engine 4.0.17 → 4.0.18
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/dist/engine/session.js
CHANGED
|
@@ -952,7 +952,7 @@ var Session = /** @class */ (function () {
|
|
|
952
952
|
};
|
|
953
953
|
Session.prototype.incrementAsync = function () {
|
|
954
954
|
return __awaiter(this, void 0, void 0, function () {
|
|
955
|
-
var isLeader, sessionState, playheadState, currentVod, _a, leaderAction, _b, m3u8_3, _c, audioIncrement, position, currentVod_1, sessionState_1, posDiff, incrementValue, index, audioSeqLastIdx, thresh, audioPosition, _d, _e, _f, _g, _h, _j, _k, _l, _m, mediaSequenceValue, diffMs, m3u8;
|
|
955
|
+
var isLeader, sessionState, playheadState, currentVod, _a, leaderAction, _b, m3u8_3, _c, audioIncrement, positionV, positionA, position, currentVod_1, sessionState_1, posDiff, incrementValue, index, audioSeqLastIdx, thresh, audioPosition, _d, _e, _f, _g, _h, _j, _k, _l, _m, mediaSequenceValue, diffMs, m3u8;
|
|
956
956
|
return __generator(this, function (_o) {
|
|
957
957
|
switch (_o.label) {
|
|
958
958
|
case 0: return [4 /*yield*/, this._tickAsync()];
|
|
@@ -1020,9 +1020,12 @@ var Session = /** @class */ (function () {
|
|
|
1020
1020
|
_c.vodMediaSeqVideo = _o.sent();
|
|
1021
1021
|
audioIncrement = void 0;
|
|
1022
1022
|
if (!this.use_demuxed_audio) return [3 /*break*/, 23];
|
|
1023
|
+
positionV = 0;
|
|
1024
|
+
positionA = 0;
|
|
1023
1025
|
return [4 /*yield*/, this._getCurrentPlayheadPosition()];
|
|
1024
1026
|
case 16:
|
|
1025
1027
|
position = (_o.sent()) * 1000;
|
|
1028
|
+
positionV = position / 1000;
|
|
1026
1029
|
return [4 /*yield*/, this._sessionState.getCurrentVod()];
|
|
1027
1030
|
case 17:
|
|
1028
1031
|
currentVod_1 = _o.sent();
|
|
@@ -1039,6 +1042,7 @@ var Session = /** @class */ (function () {
|
|
|
1039
1042
|
case 19: return [4 /*yield*/, this._getAudioPlayheadPosition(sessionState_1.vodMediaSeqAudio + index)];
|
|
1040
1043
|
case 20:
|
|
1041
1044
|
audioPosition = (_o.sent()) * 1000;
|
|
1045
|
+
positionA = audioPosition / 1000;
|
|
1042
1046
|
posDiff = position - audioPosition;
|
|
1043
1047
|
if (posDiff <= 0) {
|
|
1044
1048
|
return [3 /*break*/, 22];
|
|
@@ -1060,6 +1064,7 @@ var Session = /** @class */ (function () {
|
|
|
1060
1064
|
_o.label = 22;
|
|
1061
1065
|
case 22:
|
|
1062
1066
|
audioIncrement = index;
|
|
1067
|
+
debug("[".concat(this._sessionId, "]: Current VOD Playhead Positions are to be: [").concat(positionV.toFixed(3), "][").concat(positionA.toFixed(3), "] (").concat((positionA - positionV).toFixed(3), ")"));
|
|
1063
1068
|
_o.label = 23;
|
|
1064
1069
|
case 23:
|
|
1065
1070
|
debug("[".concat(this._sessionId, "]: Will increment audio with ").concat(audioIncrement));
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eyevinn-channel-engine",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.18",
|
|
4
4
|
"description": "OTT TV Channel Engine",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
"start-demux": "node dist/server-demux.js",
|
|
14
14
|
"start-livemix": "node dist/server-livemix.js"
|
|
15
15
|
},
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": "<18"
|
|
18
|
+
},
|
|
16
19
|
"author": "Eyevinn Technology AB <work@eyevinn.se>",
|
|
17
20
|
"contributors": [
|
|
18
21
|
"Jonas Birmé <jonas.birme@eyevinn.se> (Eyevinn Technology AB)",
|
|
@@ -26,7 +29,7 @@
|
|
|
26
29
|
"dependencies": {
|
|
27
30
|
"@eyevinn/hls-repeat": "^0.2.0",
|
|
28
31
|
"@eyevinn/hls-truncate": "^0.2.0",
|
|
29
|
-
"@eyevinn/hls-vodtolive": "^2.3.
|
|
32
|
+
"@eyevinn/hls-vodtolive": "^2.3.8",
|
|
30
33
|
"@eyevinn/m3u8": "^0.5.3",
|
|
31
34
|
"abort-controller": "^3.0.0",
|
|
32
35
|
"debug": "^3.2.7",
|
package/engine/session.js
CHANGED
|
@@ -726,7 +726,10 @@ class Session {
|
|
|
726
726
|
sessionState.vodMediaSeqVideo = await this._sessionState.increment("vodMediaSeqVideo");
|
|
727
727
|
let audioIncrement;
|
|
728
728
|
if (this.use_demuxed_audio) {
|
|
729
|
+
let positionV = 0;
|
|
730
|
+
let positionA = 0;
|
|
729
731
|
const position = (await this._getCurrentPlayheadPosition()) * 1000;
|
|
732
|
+
positionV = position / 1000;
|
|
730
733
|
let currentVod = await this._sessionState.getCurrentVod();
|
|
731
734
|
const sessionState = await this._sessionState.getValues(["vodMediaSeqAudio"]);
|
|
732
735
|
let posDiff;
|
|
@@ -737,6 +740,7 @@ class Session {
|
|
|
737
740
|
debug(`[${this._sessionId}]: About to determine audio increment`);
|
|
738
741
|
do {
|
|
739
742
|
const audioPosition = (await this._getAudioPlayheadPosition(sessionState.vodMediaSeqAudio + index)) * 1000;
|
|
743
|
+
positionA = audioPosition / 1000;
|
|
740
744
|
posDiff = position - audioPosition;
|
|
741
745
|
if (posDiff <= 0) {
|
|
742
746
|
break;
|
|
@@ -753,6 +757,7 @@ class Session {
|
|
|
753
757
|
}
|
|
754
758
|
} while (!(-thresh < posDiff && posDiff < thresh));
|
|
755
759
|
audioIncrement = index;
|
|
760
|
+
debug(`[${this._sessionId}]: Current VOD Playhead Positions are to be: [${positionV.toFixed(3)}][${positionA.toFixed(3)}] (${(positionA-positionV).toFixed(3)})`);
|
|
756
761
|
}
|
|
757
762
|
debug(`[${this._sessionId}]: Will increment audio with ${audioIncrement}`);
|
|
758
763
|
sessionState.vodMediaSeqAudio = await this._sessionState.increment("vodMediaSeqAudio", audioIncrement);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eyevinn-channel-engine",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.18",
|
|
4
4
|
"description": "OTT TV Channel Engine",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
"start-demux": "node dist/server-demux.js",
|
|
14
14
|
"start-livemix": "node dist/server-livemix.js"
|
|
15
15
|
},
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": "<18"
|
|
18
|
+
},
|
|
16
19
|
"author": "Eyevinn Technology AB <work@eyevinn.se>",
|
|
17
20
|
"contributors": [
|
|
18
21
|
"Jonas Birmé <jonas.birme@eyevinn.se> (Eyevinn Technology AB)",
|
|
@@ -26,7 +29,7 @@
|
|
|
26
29
|
"dependencies": {
|
|
27
30
|
"@eyevinn/hls-repeat": "^0.2.0",
|
|
28
31
|
"@eyevinn/hls-truncate": "^0.2.0",
|
|
29
|
-
"@eyevinn/hls-vodtolive": "^2.3.
|
|
32
|
+
"@eyevinn/hls-vodtolive": "^2.3.8",
|
|
30
33
|
"@eyevinn/m3u8": "^0.5.3",
|
|
31
34
|
"abort-controller": "^3.0.0",
|
|
32
35
|
"debug": "^3.2.7",
|