eyevinn-channel-engine 4.2.0-rc.2 → 4.2.0-rc.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.
@@ -82,7 +82,7 @@ var ChannelEngine = /** @class */ (function () {
82
82
  }
83
83
  this.useVTTSubtitles = (options && options.useVTTSubtitles) ? options.useVTTSubtitles : false;
84
84
  this.dummySubtitleEndpoint = (options && options.dummySubtitleEndpoint) ? options.dummySubtitleEndpoint : DefaultDummySubtitleEndpointPath;
85
- this.subtitleSliceEndpoint = (options && options.subtitleSliceEndpoint) ? options.dummySubtitleEndpoint : DefaultSubtitleSpliceEndpointPath;
85
+ this.subtitleSliceEndpoint = (options && options.subtitleSliceEndpoint) ? options.subtitleSliceEndpoint : DefaultSubtitleSpliceEndpointPath;
86
86
  this.alwaysNewSegments = false;
87
87
  if (options && options.alwaysNewSegments) {
88
88
  this.alwaysNewSegments = true;
@@ -1000,9 +1000,9 @@ var ChannelEngine = /** @class */ (function () {
1000
1000
  session = sessions[req.params.channelId];
1001
1001
  if (session) {
1002
1002
  try {
1003
- body = "WEBVTT";
1003
+ body = "WEBVTT\nX-TIMESTAMP-MAP=MPEGTS:0,LOCAL:00:00:00.000";
1004
1004
  res.sendRaw(200, Buffer.from(body, 'utf8'), {
1005
- "Content-Type": "application/vnd.apple.mpegurl",
1005
+ "Content-Type": "text/vtt",
1006
1006
  "Access-Control-Allow-Origin": "*",
1007
1007
  "Cache-Control": "max-age=".concat(this.streamerOpts.cacheTTL || '4'),
1008
1008
  "X-Instance-Id": this.instanceId + "<".concat(version, ">"),
@@ -1036,7 +1036,7 @@ var ChannelEngine = /** @class */ (function () {
1036
1036
  case 2:
1037
1037
  body = _a.sent();
1038
1038
  res.sendRaw(200, Buffer.from(body, 'utf8'), {
1039
- "Content-Type": "application/vnd.apple.mpegurl",
1039
+ "Content-Type": "text/vtt",
1040
1040
  "Access-Control-Allow-Origin": "*",
1041
1041
  "Cache-Control": "max-age=".concat(this.streamerOpts.cacheTTL || '4'),
1042
1042
  "X-Instance-Id": this.instanceId + "<".concat(version, ">"),
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eyevinn-channel-engine",
3
- "version": "4.2.0-rc.2",
3
+ "version": "4.2.0-rc.3",
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
@@ -203,7 +203,7 @@ export class ChannelEngine {
203
203
 
204
204
  this.useVTTSubtitles = (options && options.useVTTSubtitles) ? options.useVTTSubtitles : false ;
205
205
  this.dummySubtitleEndpoint = (options && options.dummySubtitleEndpoint) ? options.dummySubtitleEndpoint : DefaultDummySubtitleEndpointPath;
206
- this.subtitleSliceEndpoint = (options && options.subtitleSliceEndpoint) ? options.dummySubtitleEndpoint : DefaultSubtitleSpliceEndpointPath;
206
+ this.subtitleSliceEndpoint = (options && options.subtitleSliceEndpoint) ? options.subtitleSliceEndpoint : DefaultSubtitleSpliceEndpointPath;
207
207
 
208
208
  this.alwaysNewSegments = false;
209
209
  if (options && options.alwaysNewSegments) {
@@ -805,9 +805,9 @@ export class ChannelEngine {
805
805
  const session = sessions[req.params.channelId];
806
806
  if (session) {
807
807
  try {
808
- const body = `WEBVTT`;
808
+ const body = `WEBVTT\nX-TIMESTAMP-MAP=MPEGTS:0,LOCAL:00:00:00.000`;
809
809
  res.sendRaw(200, Buffer.from(body, 'utf8'), {
810
- "Content-Type": "application/vnd.apple.mpegurl",
810
+ "Content-Type": "text/vtt",
811
811
  "Access-Control-Allow-Origin": "*",
812
812
  "Cache-Control": `max-age=${this.streamerOpts.cacheTTL || '4'}`,
813
813
  "X-Instance-Id": this.instanceId + `<${version}>`,
@@ -828,7 +828,7 @@ export class ChannelEngine {
828
828
  const slicer = new SubtitleSlicer();
829
829
  const body = await slicer.generateVtt(req.query);
830
830
  res.sendRaw(200, Buffer.from(body, 'utf8'), {
831
- "Content-Type": "application/vnd.apple.mpegurl",
831
+ "Content-Type": "text/vtt",
832
832
  "Access-Control-Allow-Origin": "*",
833
833
  "Cache-Control": `max-age=${this.streamerOpts.cacheTTL || '4'}`,
834
834
  "X-Instance-Id": this.instanceId + `<${version}>`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eyevinn-channel-engine",
3
- "version": "4.2.0-rc.2",
3
+ "version": "4.2.0-rc.3",
4
4
  "description": "OTT TV Channel Engine",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",