eyevinn-channel-engine 2.22.4 → 2.23.3

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/server.js CHANGED
@@ -83,7 +83,7 @@ class ChannelEngine {
83
83
  if (options && options.forceTargetDuration) {
84
84
  this.streamerOpts.forceTargetDuration = options.forceTargetDuration;
85
85
  }
86
- this.server.get('/live/:file', async (req, res, next) => {
86
+ const handleMasterRoute = async (req, res, next) => {
87
87
  debug(req.params);
88
88
  let m;
89
89
  if (req.params.file.match(/master.m3u8/)) {
@@ -98,6 +98,14 @@ class ChannelEngine {
98
98
  req.params[2] = m[3];
99
99
  await this._handleAudioManifest(req, res, next);
100
100
  }
101
+ };
102
+
103
+ this.server.get('/live/:file', async (req, res, next) => {
104
+ await handleMasterRoute(req, res, next);
105
+ });
106
+ this.server.get('/channels/:channelId/:file', async (req, res, next) => {
107
+ req.query['channel'] = req.params.channelId;
108
+ await handleMasterRoute(req, res, next);
101
109
  });
102
110
  this.server.get('/eventstream/:sessionId', this._handleEventStream.bind(this));
103
111
  this.server.get('/status/:sessionId', this._handleStatus.bind(this));
package/engine/session.js CHANGED
@@ -673,8 +673,8 @@ class Session {
673
673
  }
674
674
  }
675
675
  case SessionState.VOD_PLAYING:
676
- if (!isLeader && sessionState.vodMediaSeqVideo === 0) {
677
- debug(`[${this._sessionId}]: First mediasequence in VOD and I am not the leader so invalidate current VOD cache and fetch the new one from the leader`);
676
+ if (!isLeader && (sessionState.vodMediaSeqVideo === 0 || sessionState.vodMediaSeqVideo === 1)) {
677
+ debug(`[${this._sessionId}]: First or second mediasequence in VOD and I am not the leader so invalidate current VOD cache and fetch the new one from the leader`);
678
678
  await this._sessionState.clearCurrentVodCache();
679
679
  currentVod = await this._sessionState.getCurrentVod();
680
680
  }
@@ -684,8 +684,8 @@ class Session {
684
684
  debug(`[${this._sessionId}]: state=VOD_NEXT_INITIATING (${sessionState.vodMediaSeqVideo}_${sessionState.vodMediaSeqAudio}, ${currentVod.getLiveMediaSequencesCount()})`);
685
685
  if (!isLeader) {
686
686
  debug(`[${this._sessionId}]: not the leader so just waiting for the VOD to be initiated`);
687
- if (sessionState.vodMediaSeqVideo === 0) {
688
- debug(`[${this._sessionId}]: First mediasequence in VOD and I am not the leader so invalidate current VOD cache and fetch the new one from the leader`);
687
+ if (sessionState.vodMediaSeqVideo === 0 || sessionState.vodMediaSeqVideo === 1) {
688
+ debug(`[${this._sessionId}]: First or second mediasequence in VOD and I am not the leader so invalidate current VOD cache and fetch the new one from the leader`);
689
689
  await this._sessionState.clearCurrentVodCache();
690
690
  }
691
691
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eyevinn-channel-engine",
3
- "version": "2.22.4",
3
+ "version": "2.23.3",
4
4
  "description": "OTT TV Channel Engine",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -19,9 +19,9 @@
19
19
  "repository": "https://github.com/Eyevinn/channel-engine",
20
20
  "license": "Apache-2.0",
21
21
  "dependencies": {
22
- "@eyevinn/hls-repeat": "^0.1.1",
23
- "@eyevinn/hls-truncate": "^0.1.0",
24
- "@eyevinn/hls-vodtolive": "^1.14.0",
22
+ "@eyevinn/hls-repeat": "0.1.6",
23
+ "@eyevinn/hls-truncate": "0.1.1",
24
+ "@eyevinn/hls-vodtolive": "1.16.3",
25
25
  "@eyevinn/m3u8": "^0.4.0",
26
26
  "debug": "^3.2.7",
27
27
  "memcache-client": "^0.10.1",