diff --git a/engine/session.js b/engine/session.js index 10f7521..32c080b 100644 --- a/engine/session.js +++ b/engine/session.js @@ -2100,40 +2100,6 @@ class Session { } return false; } - - async _determineExtraMediaIncrement(_extraType, _currentPosVideo, _extraSeqFinalIndex, _vodMediaSeqExtra, _getExtraPlayheadPositionAsyncFn) { - debug(`[${this._sessionId}]: About to determine ${_extraType} increment. Video increment has already been executed.`); - let extraMediaIncrement = 0; - let positionV = _currentPosVideo ? _currentPosVideo / 1000 : 0; - let positionX; - let posDiff; - const threshold = 0.500; - while (extraMediaIncrement < _extraSeqFinalIndex) { - const currentPosExtraMedia = (await _getExtraPlayheadPositionAsyncFn(_vodMediaSeqExtra + extraMediaIncrement)) * 1000; - positionX = currentPosExtraMedia ? currentPosExtraMedia / 1000 : 0; - posDiff = (positionV - positionX).toFixed(3); - debug(`[${this._sessionId}]: positionV=${positionV};position${_extraType === "audio" ? "A" : "S"}=${positionX};posDiff=${posDiff}`); - if (isNaN(posDiff)) { - break; - } - if (positionX >= positionV) { - break; - } - const difference = Math.abs(posDiff); - if (difference > threshold && difference > Number.EPSILON) { - // Video position ahead of audio|sub position, further increment needed... - extraMediaIncrement++; - } else { - debug(`[${this._sessionId}]: Difference(${difference}) is acceptable; IncrementValue=${extraMediaIncrement}`); - break; - } - } - return { - increment: extraMediaIncrement, - position: positionX, - diff: posDiff - }; - } } module.exports = Session; diff --git a/package-lock.json b/package-lock.json index 260d4cd..d6f5325 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "eyevinn-channel-engine", - "version": "4.3.7", + "version": "4.3.8", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "eyevinn-channel-engine", - "version": "4.3.7", + "version": "4.3.8", "license": "Apache-2.0", "dependencies": { "@eyevinn/hls-repeat": "^0.2.0", diff --git a/package.json b/package.json index 8b67d56..15214a6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eyevinn-channel-engine", - "version": "4.3.7", + "version": "4.3.8", "description": "OTT TV Channel Engine", "main": "dist/index.js", "types": "dist/index.d.ts",