@eluvio/elv-client-js 4.2.23 → 4.2.25

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.
@@ -1068,7 +1068,7 @@ exports.CopyContentObject = /*#__PURE__*/function () {
1068
1068
  break;
1069
1069
  }
1070
1070
  _context13.next = 20;
1071
- return this.Crypto.DecryptCap(metadata[userCapKey], this.signer._signingKey().privateKey);
1071
+ return this.Crypto.DecryptCap(metadata[userCapKey], this.signer);
1072
1072
  case 20:
1073
1073
  userConkKey = _context13.sent;
1074
1074
  userConkKey.qid = objectId;
@@ -1185,7 +1185,7 @@ exports.CreateNonOwnerCap = /*#__PURE__*/function () {
1185
1185
  throw Error("No user cap found for current user");
1186
1186
  case 7:
1187
1187
  _context14.next = 9;
1188
- return this.Crypto.DecryptCap(userCapValue, this.signer._signingKey().privateKey);
1188
+ return this.Crypto.DecryptCap(userCapValue, this.signer);
1189
1189
  case 9:
1190
1190
  userConk = _context14.sent;
1191
1191
  publicAddress = this.utils.PublicKeyToAddress(publicKey);
@@ -1579,13 +1579,13 @@ function _GetTenantGroupAddress() {
1579
1579
  case 20:
1580
1580
  _context33.prev = 20;
1581
1581
  _context33.t0 = _context33["catch"](11);
1582
- this.Log(_context33.t0);
1582
+ ctx.Log(_context33.t0);
1583
1583
  throw new Error("Failed to retrieve ".concat(groupName, " group address."));
1584
1584
  case 24:
1585
1585
  case "end":
1586
1586
  return _context33.stop();
1587
1587
  }
1588
- }, _callee33, this, [[11, 20]]);
1588
+ }, _callee33, null, [[11, 20]]);
1589
1589
  }));
1590
1590
  return _GetTenantGroupAddress.apply(this, arguments);
1591
1591
  }
@@ -1,11 +1,13 @@
1
- var _slicedToArray = require("@babel/runtime/helpers/slicedToArray");
2
1
  var _defineProperty = require("@babel/runtime/helpers/defineProperty");
2
+ var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties");
3
+ var _typeof = require("@babel/runtime/helpers/typeof");
3
4
  var _classCallCheck = require("@babel/runtime/helpers/classCallCheck");
4
5
  var _createClass = require("@babel/runtime/helpers/createClass");
6
+ var _excluded = ["recording_config", "recording_params"];
5
7
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
6
8
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
9
  /* eslint no-console: 0 */
8
-
10
+ var R = require("ramda");
9
11
  var DefaultABRLadder = {
10
12
  "video": [{
11
13
  bit_rate: 14000000,
@@ -51,8 +53,9 @@ var LiveconfTemplate = {
51
53
  },
52
54
  playout_config: {
53
55
  dvr_enabled: true,
54
- dvr_max_duration: 0,
56
+ dvr_max_duration: 14400,
55
57
  rebroadcast_start_time_sec_epoch: 0,
58
+ playout_sharding_level: 2,
56
59
  vod_enabled: false
57
60
  },
58
61
  recording_config: {
@@ -60,11 +63,11 @@ var LiveconfTemplate = {
60
63
  description: "",
61
64
  ladder_specs: [],
62
65
  listen: true,
63
- live_delay_nano: 2000000000,
66
+ live_delay_nano: 6000000000,
64
67
  max_duration_sec: -1,
65
68
  name: "",
66
69
  origin_url: "",
67
- part_ttl: 3600,
70
+ part_ttl: 86400,
68
71
  playout_type: "live",
69
72
  source_timescale: null,
70
73
  reconnect_timeout: 600,
@@ -101,20 +104,52 @@ var LiveconfTemplate = {
101
104
  var LiveConf = /*#__PURE__*/function () {
102
105
  "use strict";
103
106
 
104
- function LiveConf(probeData, nodeId, nodeUrl, includeAVSegDurations, overwriteOriginUrl, syncAudioToVideo) {
107
+ function LiveConf(_ref) {
108
+ var url = _ref.url,
109
+ probeData = _ref.probeData,
110
+ nodeId = _ref.nodeId,
111
+ nodeUrl = _ref.nodeUrl,
112
+ includeAVSegDurations = _ref.includeAVSegDurations,
113
+ overwriteOriginUrl = _ref.overwriteOriginUrl,
114
+ syncAudioToVideo = _ref.syncAudioToVideo,
115
+ liveRecordingMeta = _ref.liveRecordingMeta;
105
116
  _classCallCheck(this, LiveConf);
117
+ this.url = url;
106
118
  this.probeData = probeData;
107
119
  this.nodeId = nodeId;
108
120
  this.nodeUrl = nodeUrl;
109
121
  this.includeAVSegDurations = includeAVSegDurations;
110
122
  this.overwriteOriginUrl = overwriteOriginUrl;
111
123
  this.syncAudioToVideo = syncAudioToVideo;
124
+ this.currentLiveRecordingMeta = liveRecordingMeta;
112
125
  }
113
126
  _createClass(LiveConf, [{
114
- key: "probeKind",
115
- value: function probeKind() {
116
- var fileNameSplit = this.probeData.format.filename.split(":");
117
- return fileNameSplit[0];
127
+ key: "getFormat",
128
+ value: function getFormat() {
129
+ var _this$probeData$forma;
130
+ if (this.probeData.format.format_name) {
131
+ return this.probeData.format.format_name;
132
+ }
133
+ var fileNameSplit = (_this$probeData$forma = this.probeData.format) === null || _this$probeData$forma === void 0 || (_this$probeData$forma = _this$probeData$forma.filename) === null || _this$probeData$forma === void 0 ? void 0 : _this$probeData$forma.split(":");
134
+ if (fileNameSplit.length > 1) {
135
+ var protoScheme = fileNameSplit[0];
136
+ switch (protoScheme) {
137
+ case "rtmp":
138
+ return "flv";
139
+ case "udp":
140
+ case "rtp":
141
+ case "srt":
142
+ return "mpegts";
143
+ default:
144
+ return "format_unknown";
145
+ }
146
+ }
147
+ }
148
+ }, {
149
+ key: "getProtocol",
150
+ value: function getProtocol() {
151
+ var protoScheme = this.url.split(":")[0];
152
+ return protoScheme;
118
153
  }
119
154
  }, {
120
155
  key: "getStreamDataForCodecType",
@@ -132,19 +167,27 @@ var LiveConf = /*#__PURE__*/function () {
132
167
  // Used by generateAudioStreamsConfig()
133
168
  }, {
134
169
  key: "getAudioStreamsFromProbe",
135
- value: function getAudioStreamsFromProbe() {
170
+ value: function getAudioStreamsFromProbe(_ref2) {
171
+ var ladderProfile = _ref2.ladderProfile;
136
172
  var audioStreams = {};
137
173
  var audioStreamData = this.probeData.streams.filter(function (value) {
138
174
  return value.codec_type === "audio";
139
175
  });
140
- for (var index = 0; index < audioStreamData.length; index++) {
176
+ var _loop = function _loop() {
177
+ var _ladderProfile$audio, _profileAudioForType$, _currentStreamData$bi;
141
178
  var currentStreamIndex = audioStreamData[index].stream_index;
142
179
  var currentStreamData = audioStreamData[index];
180
+ var profileAudioForType = ladderProfile === null || ladderProfile === void 0 || (_ladderProfile$audio = ladderProfile.audio) === null || _ladderProfile$audio === void 0 ? void 0 : _ladderProfile$audio.find(function (a) {
181
+ return a.channels === currentStreamData.channels;
182
+ });
143
183
  audioStreams[currentStreamIndex] = {
144
- recordingBitrate: Math.max(currentStreamData.bit_rate, 128000),
184
+ recordingBitrate: (_profileAudioForType$ = profileAudioForType === null || profileAudioForType === void 0 ? void 0 : profileAudioForType.bit_rate) !== null && _profileAudioForType$ !== void 0 ? _profileAudioForType$ : Math.max((_currentStreamData$bi = currentStreamData.bit_rate) !== null && _currentStreamData$bi !== void 0 ? _currentStreamData$bi : 0, 12800),
145
185
  recordingChannels: currentStreamData.channels,
146
186
  playoutLabel: "Audio ".concat(index + 1)
147
187
  };
188
+ };
189
+ for (var index = 0; index < audioStreamData.length; index++) {
190
+ _loop();
148
191
  }
149
192
  return audioStreams;
150
193
  }
@@ -199,21 +242,20 @@ var LiveConf = /*#__PURE__*/function () {
199
242
  */
200
243
  }, {
201
244
  key: "calcSegDuration",
202
- value: function calcSegDuration(_ref) {
203
- var sourceTimescale = _ref.sourceTimescale,
204
- sampleRate = _ref.sampleRate,
205
- audioCodec = _ref.audioCodec;
245
+ value: function calcSegDuration(_ref3) {
246
+ var sourceTimescale = _ref3.sourceTimescale,
247
+ sampleRate = _ref3.sampleRate,
248
+ audioCodec = _ref3.audioCodec;
206
249
  var seg = {};
207
- switch (this.probeKind()) {
208
- case "rtmp":
250
+ switch (this.getFormat()) {
251
+ case "flv":
209
252
  seg = this.calcSegDurationRtmp({
210
253
  sourceTimescale: sourceTimescale,
211
254
  sampleRate: sampleRate,
212
255
  audioCodec: audioCodec
213
256
  });
214
257
  break;
215
- case "udp":
216
- case "srt":
258
+ case "mpegts":
217
259
  seg = this.calcSegDurationMpegts({
218
260
  sourceTimescale: sourceTimescale,
219
261
  sampleRate: sampleRate,
@@ -221,7 +263,7 @@ var LiveConf = /*#__PURE__*/function () {
221
263
  });
222
264
  break;
223
265
  default:
224
- throw "protocol not supported - " + this.probeKind();
266
+ throw "protocol not supported - " + this.getFormat();
225
267
  }
226
268
  if (audioCodec == "aac") {
227
269
  seg.audio = 29.76 * sampleRate;
@@ -245,8 +287,8 @@ var LiveConf = /*#__PURE__*/function () {
245
287
  }
246
288
  }, {
247
289
  key: "calcSegDurationMpegts",
248
- value: function calcSegDurationMpegts(_ref2) {
249
- var sourceTimescale = _ref2.sourceTimescale;
290
+ value: function calcSegDurationMpegts(_ref4) {
291
+ var sourceTimescale = _ref4.sourceTimescale;
250
292
  var videoStream = this.getStreamDataForCodecType("video");
251
293
  var frameRate = videoStream.frame_rate;
252
294
 
@@ -308,8 +350,8 @@ var LiveConf = /*#__PURE__*/function () {
308
350
  }
309
351
  }, {
310
352
  key: "calcSegDurationRtmp",
311
- value: function calcSegDurationRtmp(_ref3) {
312
- var sourceTimescale = _ref3.sourceTimescale;
353
+ value: function calcSegDurationRtmp(_ref5) {
354
+ var sourceTimescale = _ref5.sourceTimescale;
313
355
  var videoStream = this.getStreamDataForCodecType("video");
314
356
  var frameRate = videoStream.frame_rate;
315
357
  var seg = {};
@@ -372,60 +414,123 @@ var LiveConf = /*#__PURE__*/function () {
372
414
  value: function syncAudioToStreamIdValue() {
373
415
  var sync_id = -1;
374
416
  var videoStream = this.getStreamDataForCodecType("video");
375
- switch (this.probeKind()) {
376
- case "udp":
377
- case "srt":
417
+ switch (this.getFormat()) {
418
+ case "mpegts":
378
419
  sync_id = videoStream.stream_id;
379
420
  break;
380
- case "rtmp":
421
+ case "flv":
381
422
  sync_id = videoStream.stream_index;
382
423
  break;
383
424
  }
384
425
  return sync_id;
385
426
  }
386
427
 
428
+ /**
429
+ * Map custom live recording profile to the expected config structure
430
+ * @param {Object} customProfile - User's custom recording profile
431
+ * @return {Object} - Mapped config in live_recording format
432
+ */
433
+ }, {
434
+ key: "MapCustomProfileToLiveConfig",
435
+ value: function MapCustomProfileToLiveConfig(_ref6) {
436
+ var customProfile = _ref6.customProfile;
437
+ if (!customProfile) return {};
438
+ var CompactDeep = function CompactDeep(obj) {
439
+ if (obj === null || _typeof(obj) !== "object" || Array.isArray(obj)) {
440
+ return obj;
441
+ }
442
+ return R.pipe(R.reject(R.isNil), R.map(function (val) {
443
+ return _typeof(val) === "object" ? CompactDeep(val) : val;
444
+ }))(obj);
445
+ };
446
+ var recording_config = customProfile.recording_config,
447
+ recording_params = customProfile.recording_params,
448
+ rest = _objectWithoutProperties(customProfile, _excluded);
449
+ return CompactDeep({
450
+ live_recording: _objectSpread(_objectSpread({}, rest), {}, {
451
+ recording_config: {
452
+ recording_params: _objectSpread(_objectSpread({}, recording_params), {}, {
453
+ part_ttl: recording_config === null || recording_config === void 0 ? void 0 : recording_config.part_ttl,
454
+ reconnect_timeout: recording_config === null || recording_config === void 0 ? void 0 : recording_config.reconnect_timeout,
455
+ xc_params: _objectSpread(_objectSpread({}, (recording_params === null || recording_params === void 0 ? void 0 : recording_params.xc_params) || {}), {}, {
456
+ connection_timeout: recording_config === null || recording_config === void 0 ? void 0 : recording_config.connection_timeout,
457
+ copy_mpegts: recording_config === null || recording_config === void 0 ? void 0 : recording_config.copy_mpegts,
458
+ input_cfg: recording_config === null || recording_config === void 0 ? void 0 : recording_config.input_cfg
459
+ })
460
+ })
461
+ }
462
+ })
463
+ });
464
+ }
465
+
387
466
  /*
388
467
  * Generate audio streams recording configuration based on the optional custom settings.
389
468
  * If no custom "audio" section is present, record all the acceptable audio streams found in the probe
390
469
  */
391
470
  }, {
392
471
  key: "generateAudioStreamsConfig",
393
- value: function generateAudioStreamsConfig(_ref4) {
394
- var customSettings = _ref4.customSettings;
472
+ value: function generateAudioStreamsConfig(_ref7) {
473
+ var _liveRecordingConfigP, _liveRecordingConfigP2;
474
+ var liveRecordingConfigProfile = _ref7.liveRecordingConfigProfile;
475
+ var ladderProfile = (liveRecordingConfigProfile === null || liveRecordingConfigProfile === void 0 || (_liveRecordingConfigP = liveRecordingConfigProfile.playout_config) === null || _liveRecordingConfigP === void 0 ? void 0 : _liveRecordingConfigP.ladder_specs) || DefaultABRLadder;
476
+ var audioSettings = liveRecordingConfigProfile === null || liveRecordingConfigProfile === void 0 || (_liveRecordingConfigP2 = liveRecordingConfigProfile.recording_stream_config) === null || _liveRecordingConfigP2 === void 0 ? void 0 : _liveRecordingConfigP2.audio;
395
477
  var audioStreams = {};
396
- if (customSettings && customSettings.audio && Object.keys(customSettings.audio).length > 0) {
397
- for (var i = 0; i < Object.keys(customSettings.audio).length; i++) {
398
- var audioIdx = Object.keys(customSettings.audio)[i];
399
- var audio = customSettings.audio[audioIdx];
478
+ if (audioSettings && Object.keys(audioSettings).length > 0) {
479
+ var _loop2 = function _loop2() {
480
+ var _audio$recording_bitr;
481
+ var audioIdx = Object.keys(audioSettings)[i];
482
+ var audio = audioSettings[audioIdx];
483
+ var profileAudioForType = ladderProfile === null || ladderProfile === void 0 ? void 0 : ladderProfile.audio.find(function (a) {
484
+ var _audio$channels;
485
+ return a.channels === ((_audio$channels = audio.channels) !== null && _audio$channels !== void 0 ? _audio$channels : 2);
486
+ });
400
487
  audioStreams[audioIdx] = {
401
- recordingBitrate: audio.recording_bitrate || 192000,
402
- recordingChannels: audio.recording_channels || 2
488
+ recordingBitrate: ladderProfile !== null && ladderProfile !== void 0 && ladderProfile.audio ? profileAudioForType.bit_rate : (_audio$recording_bitr = audio.recording_bitrate) !== null && _audio$recording_bitr !== void 0 ? _audio$recording_bitr : 192000,
489
+ recordingChannels: audio.recording_channels || 2,
490
+ lang: audio.lang,
491
+ isDefault: audio["default"]
403
492
  };
404
493
  if (audio.playout) {
405
494
  audioStreams[audioIdx].playoutLabel = audio.playout_label || "Audio ".concat(i + 1);
406
495
  }
496
+ };
497
+ for (var i = 0; i < Object.keys(audioSettings).length; i++) {
498
+ _loop2();
407
499
  }
408
500
  }
409
501
 
410
502
  // If no audio streams specified in custom config, set up all the suitable audio streams in the probe
411
- if (!customSettings.audio || Object.keys(customSettings.audio).length == 0) {
412
- audioStreams = this.getAudioStreamsFromProbe();
503
+ if (!audioSettings || Object.keys(audioSettings).length === 0) {
504
+ audioStreams = this.getAudioStreamsFromProbe({
505
+ ladderProfile: ladderProfile
506
+ });
413
507
  }
414
508
  return audioStreams;
415
509
  }
416
510
 
417
511
  /*
418
- * Generate the live recording config as required by QFAB, based on defaults and optional custom settings.
512
+ * Generate the live recording config as required by QFAB, based on defaults, existing settings and optional custom settings.
419
513
  */
420
514
  }, {
421
515
  key: "generateLiveConf",
422
- value: function generateLiveConf(_ref5) {
423
- var customSettings = _ref5.customSettings;
424
- // gather required data
425
- var conf = JSON.parse(JSON.stringify(LiveconfTemplate));
426
- var fileName = this.overwriteOriginUrl || this.probeData.format.filename;
516
+ value: function generateLiveConf(_ref8) {
517
+ var _customSettings$liveR, _customSettings$liveR2, _ladder_specs$video;
518
+ var customSettings = _ref8.customSettings;
519
+ // Saved config overrides defaults and is preserved on reconfiguration
520
+ var conf = R.clone(LiveconfTemplate);
521
+ if (this.currentLiveRecordingMeta) {
522
+ conf = R.mergeDeepRight(conf, {
523
+ live_recording: this.currentLiveRecordingMeta
524
+ });
525
+ }
526
+ if (customSettings.liveRecordingConfigProfile) {
527
+ conf = R.mergeDeepRight(conf, this.MapCustomProfileToLiveConfig({
528
+ customProfile: customSettings.liveRecordingConfigProfile
529
+ }));
530
+ }
531
+ var fileName = this.url;
427
532
  var audioStreams = this.generateAudioStreamsConfig({
428
- customSettings: customSettings
533
+ liveRecordingConfigProfile: customSettings.liveRecordingConfigProfile
429
534
  });
430
535
 
431
536
  // Retrieve one audio stream from the probe to read the sample rate and codec name
@@ -453,17 +558,13 @@ var LiveConf = /*#__PURE__*/function () {
453
558
  }
454
559
 
455
560
  // Fill in specifics for protocol
456
- switch (this.probeKind()) {
457
- case "udp":
561
+ switch (this.getFormat()) {
562
+ case "mpegts":
458
563
  sourceTimescale = 90000;
459
564
  conf.live_recording.recording_config.recording_params.source_timescale = sourceTimescale;
460
565
  break;
461
- case "srt":
462
- sourceTimescale = 90000;
463
- conf.live_recording.recording_config.recording_params.source_timescale = sourceTimescale;
464
- conf.live_recording.recording_config.recording_params.live_delay_nano = 4000000000;
465
- break;
466
566
  case "rtmp":
567
+ case "flv":
467
568
  sourceTimescale = 16000;
468
569
  conf.live_recording.recording_config.recording_params.source_timescale = sourceTimescale;
469
570
  break;
@@ -471,7 +572,14 @@ var LiveConf = /*#__PURE__*/function () {
471
572
  console.log("HLS detected. Not yet implemented");
472
573
  break;
473
574
  default:
474
- console.log("Unsupported media", this.probeKind());
575
+ console.log("Unsupported media", this.getFormat());
576
+ break;
577
+ }
578
+ switch (this.getProtocol()) {
579
+ case "srt":
580
+ if (!((_customSettings$liveR = customSettings.liveRecordingConfigProfile) !== null && _customSettings$liveR !== void 0 && (_customSettings$liveR = _customSettings$liveR.recording_params) !== null && _customSettings$liveR !== void 0 && _customSettings$liveR.live_delay_nano)) {
581
+ conf.live_recording.recording_config.recording_params.live_delay_nano = 6000000000;
582
+ }
475
583
  break;
476
584
  }
477
585
  var segDurations = this.calcSegDuration({
@@ -496,10 +604,14 @@ var LiveConf = /*#__PURE__*/function () {
496
604
  if (segDurations.videoFrameDurationTs) {
497
605
  conf.live_recording.recording_config.recording_params.xc_params.video_frame_duration_ts = segDurations.videoFrameDurationTs;
498
606
  }
499
- var ladderProfile = customSettings.ladder_profile || DefaultABRLadder;
607
+ var ladder_specs = (_customSettings$liveR2 = customSettings.liveRecordingConfigProfile) === null || _customSettings$liveR2 === void 0 || (_customSettings$liveR2 = _customSettings$liveR2.playout_config) === null || _customSettings$liveR2 === void 0 ? void 0 : _customSettings$liveR2.ladder_specs;
608
+ var ladderProfile = (ladder_specs === null || ladder_specs === void 0 || (_ladder_specs$video = ladder_specs.video) === null || _ladder_specs$video === void 0 ? void 0 : _ladder_specs$video.length) > 0 ? ladder_specs : DefaultABRLadder;
500
609
  conf.live_recording.recording_config.recording_params.xc_params.enc_height = videoStream.height;
501
610
  conf.live_recording.recording_config.recording_params.xc_params.enc_width = videoStream.width;
502
611
 
612
+ // Reset ladder specs (updating existing stream will carry over old specs
613
+ conf.live_recording.recording_config.recording_params.ladder_specs = [];
614
+
503
615
  // Determine video recording bitrate and ABR ladder
504
616
  var topLadderRate = 0;
505
617
  for (var _i = 0; _i < ladderProfile.video.length; _i++) {
@@ -521,6 +633,7 @@ var LiveConf = /*#__PURE__*/function () {
521
633
  var globalAudioBitrate = 0;
522
634
  var nAudio = 0;
523
635
  for (var _i2 = 0; _i2 < Object.keys(audioStreams).length; _i2++) {
636
+ var _audio$lang;
524
637
  var audioLadderSpec = {};
525
638
  var audioIndex = Object.keys(audioStreams)[_i2];
526
639
  var audio = audioStreams[audioIndex];
@@ -543,7 +656,8 @@ var LiveConf = /*#__PURE__*/function () {
543
656
  audioLadderSpec.stream_name = "audio_".concat(audioIndex);
544
657
  audioLadderSpec.stream_label = audio.playoutLabel ? audio.playoutLabel : null;
545
658
  audioLadderSpec.media_type = 2;
546
- if (Object.keys(audioStreams).length === 1) {
659
+ audioLadderSpec.lang = (_audio$lang = audio.lang) !== null && _audio$lang !== void 0 ? _audio$lang : "";
660
+ if (Object.keys(audioStreams).length === 1 || audio.isDefault) {
547
661
  audioLadderSpec["default"] = true;
548
662
  }
549
663
  conf.live_recording.recording_config.recording_params.ladder_specs.push(audioLadderSpec);
@@ -556,33 +670,6 @@ var LiveConf = /*#__PURE__*/function () {
556
670
  // Global recording bitrate for all audio streams
557
671
  conf.live_recording.recording_config.recording_params.xc_params.audio_bitrate = globalAudioBitrate;
558
672
  conf.live_recording.recording_config.recording_params.xc_params.n_audio = nAudio;
559
-
560
- // Iterate through custom settings (which will override any existing setting)
561
- function SetByPath(_ref6) {
562
- var obj = _ref6.obj,
563
- path = _ref6.path,
564
- value = _ref6.value;
565
- var keys = path.split(".");
566
- var temp = obj;
567
- for (var _i3 = 0; _i3 < keys.length - 1; _i3++) {
568
- if (!temp[keys[_i3]]) {
569
- temp[keys[_i3]] = {};
570
- }
571
- temp = temp[keys[_i3]];
572
- }
573
- temp[keys[keys.length - 1]] = value;
574
- }
575
- var metaPathValues = customSettings.metaPathValues;
576
- for (var _i4 = 0, _Object$entries = Object.entries(metaPathValues || {}); _i4 < _Object$entries.length; _i4++) {
577
- var _Object$entries$_i = _slicedToArray(_Object$entries[_i4], 2),
578
- path = _Object$entries$_i[0],
579
- value = _Object$entries$_i[1];
580
- SetByPath({
581
- obj: conf,
582
- path: path,
583
- value: value
584
- });
585
- }
586
673
  return conf;
587
674
  }
588
675
  }]);