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.
- package/dist/engine/server.js +4 -4
- package/dist/package.json +1 -1
- package/engine/server.ts +4 -4
- package/package.json +1 -1
package/dist/engine/server.js
CHANGED
|
@@ -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.
|
|
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": "
|
|
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": "
|
|
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
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.
|
|
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": "
|
|
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": "
|
|
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}>`,
|