eyevinn-channel-engine 4.2.11 → 4.2.12

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.
@@ -16,6 +16,7 @@ export interface ChannelEngineOpts {
16
16
  dummySubtitleEndpoint?: string;
17
17
  subtitleSliceEndpoint?: string;
18
18
  useVTTSubtitles?: boolean;
19
+ vttBasePath?: string;
19
20
  alwaysNewSegments?: boolean;
20
21
  alwaysMapBandwidthByNearest?: boolean;
21
22
  diffCompensationRate?: number;
@@ -59,8 +59,8 @@ var sessionsLive = {}; // Should be a persistent store...
59
59
  var sessionSwitchers = {}; // Should be a persistent store...
60
60
  var switcherStatus = {}; // Should be a persistent store...
61
61
  var eventStreams = {};
62
- var DefaultDummySubtitleEndpointPath = "/vtt/dummyUrl";
63
- var DefaultSubtitleSpliceEndpointPath = "/vtt/sliceUrl";
62
+ var DefaultDummySubtitleEndpointPath = "/dummyUrl";
63
+ var DefaultSubtitleSpliceEndpointPath = "/sliceUrl";
64
64
  var ScheduleStreamType;
65
65
  (function (ScheduleStreamType) {
66
66
  ScheduleStreamType[ScheduleStreamType["LIVE"] = 1] = "LIVE";
@@ -83,8 +83,9 @@ var ChannelEngine = /** @class */ (function () {
83
83
  this.useDemuxedAudio = true;
84
84
  }
85
85
  this.useVTTSubtitles = (options && options.useVTTSubtitles) ? options.useVTTSubtitles : false;
86
- this.dummySubtitleEndpoint = (options && options.dummySubtitleEndpoint) ? options.dummySubtitleEndpoint : DefaultDummySubtitleEndpointPath;
87
- this.subtitleSliceEndpoint = (options && options.subtitleSliceEndpoint) ? options.subtitleSliceEndpoint : DefaultSubtitleSpliceEndpointPath;
86
+ var vttBasePath = (options && options.vttBasePath) ? options.vttBasePath : '/vtt';
87
+ this.dummySubtitleEndpoint = (options && options.dummySubtitleEndpoint) ? options.dummySubtitleEndpoint : vttBasePath + DefaultDummySubtitleEndpointPath;
88
+ this.subtitleSliceEndpoint = (options && options.subtitleSliceEndpoint) ? options.subtitleSliceEndpoint : vttBasePath + DefaultSubtitleSpliceEndpointPath;
88
89
  this.alwaysNewSegments = false;
89
90
  if (options && options.alwaysNewSegments) {
90
91
  this.alwaysNewSegments = true;
@@ -259,8 +260,8 @@ var ChannelEngine = /** @class */ (function () {
259
260
  this.server.get('/health', this._handleAggregatedSessionHealth.bind(this));
260
261
  this.server.get('/health/:sessionId', this._handleSessionHealth.bind(this));
261
262
  this.server.get('/reset', this._handleSessionReset.bind(this));
262
- this.server.get(DefaultDummySubtitleEndpointPath, this._handleDummySubtitleEndpoint.bind(this));
263
- this.server.get(DefaultSubtitleSpliceEndpointPath, this._handleSubtitleSliceEndpoint.bind(this));
263
+ this.server.get(vttBasePath + DefaultDummySubtitleEndpointPath, this._handleDummySubtitleEndpoint.bind(this));
264
+ this.server.get(vttBasePath + DefaultSubtitleSpliceEndpointPath, this._handleSubtitleSliceEndpoint.bind(this));
264
265
  this.server.on('NotFound', function (req, res, err, next) {
265
266
  res.header("X-Instance-Id", _this.instanceId + "<".concat(version, ">"));
266
267
  return next();
@@ -100,7 +100,8 @@ var engineOptions = {
100
100
  redisUrl: process.env.REDIS_URL,
101
101
  useDemuxedAudio: true,
102
102
  alwaysNewSegments: false,
103
- useVTTSubtitles: true
103
+ useVTTSubtitles: true,
104
+ vttBasePath: '/subtitles'
104
105
  };
105
106
  var engine = new index_1.ChannelEngine(refAssetManager, engineOptions);
106
107
  engine.start();
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eyevinn-channel-engine",
3
- "version": "4.2.11",
3
+ "version": "4.2.12",
4
4
  "description": "OTT TV Channel Engine",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/engine/server.ts CHANGED
@@ -24,8 +24,8 @@ const sessionsLive = {}; // Should be a persistent store...
24
24
  const sessionSwitchers = {}; // Should be a persistent store...
25
25
  const switcherStatus = {}; // Should be a persistent store...
26
26
  const eventStreams = {};
27
- const DefaultDummySubtitleEndpointPath = "/vtt/dummyUrl"
28
- const DefaultSubtitleSpliceEndpointPath = "/vtt/sliceUrl"
27
+ const DefaultDummySubtitleEndpointPath = "/dummyUrl"
28
+ const DefaultSubtitleSpliceEndpointPath = "/sliceUrl"
29
29
 
30
30
  export interface ChannelEngineOpts {
31
31
  defaultSlateUri?: string;
@@ -45,6 +45,7 @@ export interface ChannelEngineOpts {
45
45
  dummySubtitleEndpoint?: string;
46
46
  subtitleSliceEndpoint?: string;
47
47
  useVTTSubtitles?: boolean;
48
+ vttBasePath?: string;
48
49
  alwaysNewSegments?: boolean;
49
50
  alwaysMapBandwidthByNearest?: boolean;
50
51
  diffCompensationRate?: number;
@@ -216,8 +217,9 @@ export class ChannelEngine {
216
217
  }
217
218
 
218
219
  this.useVTTSubtitles = (options && options.useVTTSubtitles) ? options.useVTTSubtitles : false ;
219
- this.dummySubtitleEndpoint = (options && options.dummySubtitleEndpoint) ? options.dummySubtitleEndpoint : DefaultDummySubtitleEndpointPath;
220
- this.subtitleSliceEndpoint = (options && options.subtitleSliceEndpoint) ? options.subtitleSliceEndpoint : DefaultSubtitleSpliceEndpointPath;
220
+ const vttBasePath = (options && options.vttBasePath) ? options.vttBasePath : '/vtt';
221
+ this.dummySubtitleEndpoint = (options && options.dummySubtitleEndpoint) ? options.dummySubtitleEndpoint : vttBasePath + DefaultDummySubtitleEndpointPath;
222
+ this.subtitleSliceEndpoint = (options && options.subtitleSliceEndpoint) ? options.subtitleSliceEndpoint : vttBasePath + DefaultSubtitleSpliceEndpointPath;
221
223
 
222
224
  this.alwaysNewSegments = false;
223
225
  if (options && options.alwaysNewSegments) {
@@ -356,8 +358,8 @@ export class ChannelEngine {
356
358
  this.server.get('/health', this._handleAggregatedSessionHealth.bind(this));
357
359
  this.server.get('/health/:sessionId', this._handleSessionHealth.bind(this));
358
360
  this.server.get('/reset', this._handleSessionReset.bind(this));
359
- this.server.get(DefaultDummySubtitleEndpointPath, this._handleDummySubtitleEndpoint.bind(this));
360
- this.server.get(DefaultSubtitleSpliceEndpointPath, this._handleSubtitleSliceEndpoint.bind(this));
361
+ this.server.get(vttBasePath + DefaultDummySubtitleEndpointPath, this._handleDummySubtitleEndpoint.bind(this));
362
+ this.server.get(vttBasePath + DefaultSubtitleSpliceEndpointPath, this._handleSubtitleSliceEndpoint.bind(this));
361
363
 
362
364
  this.server.on('NotFound', (req, res, err, next) => {
363
365
  res.header("X-Instance-Id", this.instanceId + `<${version}>`);
package/examples/demux.ts CHANGED
@@ -112,7 +112,8 @@ const engineOptions: ChannelEngineOpts = {
112
112
  redisUrl: process.env.REDIS_URL,
113
113
  useDemuxedAudio: true,
114
114
  alwaysNewSegments: false,
115
- useVTTSubtitles: true
115
+ useVTTSubtitles: true,
116
+ vttBasePath: '/subtitles'
116
117
  };
117
118
 
118
119
  const engine = new ChannelEngine(refAssetManager, engineOptions);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eyevinn-channel-engine",
3
- "version": "4.2.11",
3
+ "version": "4.2.12",
4
4
  "description": "OTT TV Channel Engine",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",