eyevinn-channel-engine 4.0.3 → 4.0.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/dist/engine/server.d.ts +1 -0
- package/dist/engine/server.js +1 -0
- package/dist/engine/session.d.ts +1 -0
- package/dist/engine/session.js +7 -2
- package/dist/package.json +1 -1
- package/engine/server.ts +2 -0
- package/engine/session.js +7 -2
- package/package.json +1 -1
package/dist/engine/server.d.ts
CHANGED
package/dist/engine/server.js
CHANGED
|
@@ -406,6 +406,7 @@ var ChannelEngine = /** @class */ (function () {
|
|
|
406
406
|
averageSegmentDuration: channel.options && channel.options.averageSegmentDuration ? channel.options.averageSegmentDuration : this.streamerOpts.defaultAverageSegmentDuration,
|
|
407
407
|
useDemuxedAudio: options.useDemuxedAudio,
|
|
408
408
|
alwaysNewSegments: options.alwaysNewSegments,
|
|
409
|
+
noSessionDataTags: options.noSessionDataTags,
|
|
409
410
|
playheadDiffThreshold: channel.options && channel.options.playheadDiffThreshold ? channel.options.playheadDiffThreshold : this.streamerOpts.defaultPlayheadDiffThreshold,
|
|
410
411
|
maxTickInterval: channel.options && channel.options.maxTickInterval ? channel.options.maxTickInterval : this.streamerOpts.defaultMaxTickInterval,
|
|
411
412
|
targetDurationPadding: channel.options && channel.options.targetDurationPadding ? channel.options.targetDurationPadding : this.streamerOpts.targetDurationPadding,
|
package/dist/engine/session.d.ts
CHANGED
package/dist/engine/session.js
CHANGED
|
@@ -124,6 +124,9 @@ var Session = /** @class */ (function () {
|
|
|
124
124
|
if (config.closedCaptions) {
|
|
125
125
|
this._closedCaptions = config.closedCaptions;
|
|
126
126
|
}
|
|
127
|
+
if (config.noSessionDataTags) {
|
|
128
|
+
this._noSessionDataTags = config.noSessionDataTags;
|
|
129
|
+
}
|
|
127
130
|
if (config.slateUri) {
|
|
128
131
|
this.slateUri = config.slateUri;
|
|
129
132
|
this.slateRepetitions = config.slateRepetitions || 10;
|
|
@@ -1367,8 +1370,10 @@ var Session = /** @class */ (function () {
|
|
|
1367
1370
|
m3u8 = "#EXTM3U\n";
|
|
1368
1371
|
m3u8 += "#EXT-X-VERSION:4\n";
|
|
1369
1372
|
m3u8 += m3u8Header(this._instanceId);
|
|
1370
|
-
|
|
1371
|
-
|
|
1373
|
+
if (!this._noSessionDataTags) {
|
|
1374
|
+
m3u8 += "#EXT-X-SESSION-DATA:DATA-ID=\"eyevinn.tv.session.id\",VALUE=\"".concat(this._sessionId, "\"\n");
|
|
1375
|
+
m3u8 += "#EXT-X-SESSION-DATA:DATA-ID=\"eyevinn.tv.eventstream\",VALUE=\"/eventstream/".concat(this._sessionId, "\"\n");
|
|
1376
|
+
}
|
|
1372
1377
|
return [4 /*yield*/, this._sessionState.getCurrentVod()];
|
|
1373
1378
|
case 1:
|
|
1374
1379
|
currentVod = _a.sent();
|
package/dist/package.json
CHANGED
package/engine/server.ts
CHANGED
|
@@ -46,6 +46,7 @@ export interface ChannelEngineOpts {
|
|
|
46
46
|
forceTargetDuration?: boolean;
|
|
47
47
|
adCopyMgrUri?: string; // deprecated
|
|
48
48
|
adXchangeUri?: string; // deprecated
|
|
49
|
+
noSessionDataTags?: boolean;
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
interface StreamerOpts {
|
|
@@ -396,6 +397,7 @@ export class ChannelEngine {
|
|
|
396
397
|
averageSegmentDuration: channel.options && channel.options.averageSegmentDuration ? channel.options.averageSegmentDuration : this.streamerOpts.defaultAverageSegmentDuration,
|
|
397
398
|
useDemuxedAudio: options.useDemuxedAudio,
|
|
398
399
|
alwaysNewSegments: options.alwaysNewSegments,
|
|
400
|
+
noSessionDataTags: options.noSessionDataTags,
|
|
399
401
|
playheadDiffThreshold: channel.options && channel.options.playheadDiffThreshold ? channel.options.playheadDiffThreshold : this.streamerOpts.defaultPlayheadDiffThreshold,
|
|
400
402
|
maxTickInterval: channel.options && channel.options.maxTickInterval ? channel.options.maxTickInterval : this.streamerOpts.defaultMaxTickInterval,
|
|
401
403
|
targetDurationPadding: channel.options && channel.options.targetDurationPadding ? channel.options.targetDurationPadding : this.streamerOpts.targetDurationPadding,
|
package/engine/session.js
CHANGED
|
@@ -97,6 +97,9 @@ class Session {
|
|
|
97
97
|
if (config.closedCaptions) {
|
|
98
98
|
this._closedCaptions = config.closedCaptions;
|
|
99
99
|
}
|
|
100
|
+
if (config.noSessionDataTags) {
|
|
101
|
+
this._noSessionDataTags = config.noSessionDataTags;
|
|
102
|
+
}
|
|
100
103
|
if (config.slateUri) {
|
|
101
104
|
this.slateUri = config.slateUri;
|
|
102
105
|
this.slateRepetitions = config.slateRepetitions || 10;
|
|
@@ -952,8 +955,10 @@ class Session {
|
|
|
952
955
|
let m3u8 = "#EXTM3U\n";
|
|
953
956
|
m3u8 += "#EXT-X-VERSION:4\n";
|
|
954
957
|
m3u8 += m3u8Header(this._instanceId);
|
|
955
|
-
|
|
956
|
-
|
|
958
|
+
if (!this._noSessionDataTags) {
|
|
959
|
+
m3u8 += `#EXT-X-SESSION-DATA:DATA-ID="eyevinn.tv.session.id",VALUE="${this._sessionId}"\n`;
|
|
960
|
+
m3u8 += `#EXT-X-SESSION-DATA:DATA-ID="eyevinn.tv.eventstream",VALUE="/eventstream/${this._sessionId}"\n`;
|
|
961
|
+
}
|
|
957
962
|
const currentVod = await this._sessionState.getCurrentVod();
|
|
958
963
|
if (!currentVod) {
|
|
959
964
|
throw new Error('Session not ready');
|