eyevinn-channel-engine 3.4.2 → 3.4.4
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/README.md +6 -0
- package/dist/engine/server.d.ts +9 -1
- package/dist/engine/server.js +24 -0
- package/dist/package.json +2 -2
- package/engine/server.ts +28 -1
- package/package.json +2 -2
- package/server-livemix.ts +1 -1
package/README.md
CHANGED
|
@@ -33,6 +33,12 @@ Supported Node.js Versions
|
|
|
33
33
|
|
|
34
34
|
Follow [this tutorial](https://vod2live.docs.eyevinn.technology/getting-started.html) to get started building your own FAST channel engine.
|
|
35
35
|
|
|
36
|
+
## Migration
|
|
37
|
+
|
|
38
|
+
### Upgrading from 3.3.x to >= 3.4.x
|
|
39
|
+
|
|
40
|
+
A breaking change was introduced in v3.4.0 when Typescript types were introduced. The library no longer exports a default. This means that you need to change `const ChannelEngine = require('eyevinn-channel-engine')` to `const { ChannelEngine } = require('eyevinn-channel-engine')`;
|
|
41
|
+
|
|
36
42
|
## Support
|
|
37
43
|
|
|
38
44
|
Join our [community on Slack](http://slack.streamingtech.se) where you can post any questions regarding any of our open source projects. Eyevinn's consulting business can also offer you:
|
package/dist/engine/server.d.ts
CHANGED
|
@@ -61,6 +61,14 @@ export interface Channel {
|
|
|
61
61
|
id: string;
|
|
62
62
|
profile: ChannelProfile[];
|
|
63
63
|
audioTracks?: AudioTracks[];
|
|
64
|
+
closedCaptions?: ClosedCaptions[];
|
|
65
|
+
}
|
|
66
|
+
export interface ClosedCaptions {
|
|
67
|
+
id: string;
|
|
68
|
+
lang: string;
|
|
69
|
+
name: string;
|
|
70
|
+
default?: boolean;
|
|
71
|
+
auto?: boolean;
|
|
64
72
|
}
|
|
65
73
|
export interface AudioTracks {
|
|
66
74
|
language: string;
|
|
@@ -85,7 +93,7 @@ export interface Schedule {
|
|
|
85
93
|
duration?: number;
|
|
86
94
|
}
|
|
87
95
|
export interface IStreamSwitchManager {
|
|
88
|
-
getSchedule: (channelId: string) => Promise<Schedule>;
|
|
96
|
+
getSchedule: (channelId: string) => Promise<Schedule[]>;
|
|
89
97
|
}
|
|
90
98
|
export declare class ChannelEngine {
|
|
91
99
|
private options?;
|
package/dist/engine/server.js
CHANGED
|
@@ -203,6 +203,30 @@ var ChannelEngine = /** @class */ (function () {
|
|
|
203
203
|
}
|
|
204
204
|
});
|
|
205
205
|
}); });
|
|
206
|
+
this.server.opts('/live/:file', function (req, res, next) { return __awaiter(_this, void 0, void 0, function () {
|
|
207
|
+
return __generator(this, function (_a) {
|
|
208
|
+
res.sendRaw(204, "", {
|
|
209
|
+
headers: {
|
|
210
|
+
"Access-Control-Allow-Origin": "*",
|
|
211
|
+
"Access-Control-Allow-Methods": "GET, OPTIONS",
|
|
212
|
+
},
|
|
213
|
+
});
|
|
214
|
+
next();
|
|
215
|
+
return [2 /*return*/];
|
|
216
|
+
});
|
|
217
|
+
}); });
|
|
218
|
+
this.server.opts('/channels/:channelId/:file', function (req, res, next) { return __awaiter(_this, void 0, void 0, function () {
|
|
219
|
+
return __generator(this, function (_a) {
|
|
220
|
+
res.sendRaw(204, "", {
|
|
221
|
+
headers: {
|
|
222
|
+
"Access-Control-Allow-Origin": "*",
|
|
223
|
+
"Access-Control-Allow-Methods": "GET, OPTIONS",
|
|
224
|
+
},
|
|
225
|
+
});
|
|
226
|
+
next();
|
|
227
|
+
return [2 /*return*/];
|
|
228
|
+
});
|
|
229
|
+
}); });
|
|
206
230
|
this.server.get('/eventstream/:sessionId', this._handleEventStream.bind(this));
|
|
207
231
|
this.server.get('/status/:sessionId', this._handleStatus.bind(this));
|
|
208
232
|
this.server.get('/health', this._handleAggregatedSessionHealth.bind(this));
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eyevinn-channel-engine",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.4",
|
|
4
4
|
"description": "OTT TV Channel Engine",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"promise.allsettled": "^1.0.4",
|
|
36
36
|
"redis": "^3.0.2",
|
|
37
37
|
"request": ">=2.88.0",
|
|
38
|
-
"restify": "
|
|
38
|
+
"restify": "9.0.0",
|
|
39
39
|
"restify-errors": "^8.0.2",
|
|
40
40
|
"uuid": "^8.3.2"
|
|
41
41
|
},
|
package/engine/server.ts
CHANGED
|
@@ -103,6 +103,15 @@ export interface Channel {
|
|
|
103
103
|
id: string;
|
|
104
104
|
profile: ChannelProfile[];
|
|
105
105
|
audioTracks?: AudioTracks[];
|
|
106
|
+
closedCaptions?: ClosedCaptions[];
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface ClosedCaptions {
|
|
110
|
+
id: string;
|
|
111
|
+
lang: string;
|
|
112
|
+
name: string;
|
|
113
|
+
default?: boolean;
|
|
114
|
+
auto?: boolean;
|
|
106
115
|
}
|
|
107
116
|
|
|
108
117
|
export interface AudioTracks {
|
|
@@ -132,7 +141,7 @@ export interface Schedule {
|
|
|
132
141
|
}
|
|
133
142
|
|
|
134
143
|
export interface IStreamSwitchManager {
|
|
135
|
-
getSchedule: (channelId: string) => Promise<Schedule>;
|
|
144
|
+
getSchedule: (channelId: string) => Promise<Schedule[]>;
|
|
136
145
|
}
|
|
137
146
|
|
|
138
147
|
export class ChannelEngine {
|
|
@@ -267,6 +276,24 @@ export class ChannelEngine {
|
|
|
267
276
|
req.query['channel'] = req.params.channelId;
|
|
268
277
|
await handleMasterRoute(req, res, next);
|
|
269
278
|
});
|
|
279
|
+
this.server.opts('/live/:file', async (req, res, next) => {
|
|
280
|
+
res.sendRaw(204, "", {
|
|
281
|
+
headers: {
|
|
282
|
+
"Access-Control-Allow-Origin": "*",
|
|
283
|
+
"Access-Control-Allow-Methods": "GET, OPTIONS",
|
|
284
|
+
},
|
|
285
|
+
});
|
|
286
|
+
next();
|
|
287
|
+
});
|
|
288
|
+
this.server.opts('/channels/:channelId/:file', async (req, res, next) => {
|
|
289
|
+
res.sendRaw(204, "", {
|
|
290
|
+
headers: {
|
|
291
|
+
"Access-Control-Allow-Origin": "*",
|
|
292
|
+
"Access-Control-Allow-Methods": "GET, OPTIONS",
|
|
293
|
+
},
|
|
294
|
+
});
|
|
295
|
+
next();
|
|
296
|
+
});
|
|
270
297
|
this.server.get('/eventstream/:sessionId', this._handleEventStream.bind(this));
|
|
271
298
|
this.server.get('/status/:sessionId', this._handleStatus.bind(this));
|
|
272
299
|
this.server.get('/health', this._handleAggregatedSessionHealth.bind(this));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eyevinn-channel-engine",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.4",
|
|
4
4
|
"description": "OTT TV Channel Engine",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"promise.allsettled": "^1.0.4",
|
|
36
36
|
"redis": "^3.0.2",
|
|
37
37
|
"request": ">=2.88.0",
|
|
38
|
-
"restify": "
|
|
38
|
+
"restify": "9.0.0",
|
|
39
39
|
"restify-errors": "^8.0.2",
|
|
40
40
|
"uuid": "^8.3.2"
|
|
41
41
|
},
|
package/server-livemix.ts
CHANGED
|
@@ -149,7 +149,7 @@ class StreamSwitchManager implements IStreamSwitchManager {
|
|
|
149
149
|
return new Promise((resolve, reject) => { resolve(defaultPrerollSlateUri); });
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
getSchedule(channelId): Promise<Schedule> {
|
|
152
|
+
getSchedule(channelId): Promise<Schedule[]> {
|
|
153
153
|
return new Promise((resolve, reject) => {
|
|
154
154
|
if (this.schedule[channelId]) {
|
|
155
155
|
const tsNow = Date.now();
|