@eluvio/elv-client-js 4.0.131 → 4.0.133
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/package.json +1 -1
- package/src/client/LiveConf.js +20 -24
- package/src/client/LiveStream.js +1 -0
package/package.json
CHANGED
package/src/client/LiveConf.js
CHANGED
|
@@ -435,30 +435,6 @@ class LiveConf {
|
|
|
435
435
|
conf.live_recording.recording_config.recording_params.xc_params.sync_audio_to_stream_id = this.syncAudioToStreamIdValue();
|
|
436
436
|
}
|
|
437
437
|
|
|
438
|
-
if(customSettings.edge_write_token) {
|
|
439
|
-
conf.live_recording.fabric_config.edge_write_token = customSettings.edge_write_token;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
if(customSettings.part_ttl) {
|
|
443
|
-
conf.live_recording.recording_config.recording_params.part_ttl = customSettings.part_ttl;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
if(Object.hasOwn(customSettings, "persistent")) {
|
|
447
|
-
conf.live_recording.recording_config.recording_params.persistent = customSettings.persistent;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
if(customSettings.connection_timeout) {
|
|
451
|
-
conf.live_recording.recording_config.recording_params.xc_params.connection_timeout = customSettings.connection_timeout;
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
if(customSettings.reconnect_timeout) {
|
|
455
|
-
conf.live_recording.recording_config.recording_params.reconnect_timeout = customSettings.reconnect_timeout;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
if(Object.hasOwn(customSettings, "copy_mpegts")) {
|
|
459
|
-
conf.live_recording.recording_config.recording_params.xc_params.copy_mpegts = customSettings.copy_mpegts;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
438
|
// Fill in specifics for protocol
|
|
463
439
|
switch(this.probeKind()) {
|
|
464
440
|
case "udp":
|
|
@@ -564,6 +540,26 @@ class LiveConf {
|
|
|
564
540
|
conf.live_recording.recording_config.recording_params.xc_params.audio_bitrate = globalAudioBitrate;
|
|
565
541
|
conf.live_recording.recording_config.recording_params.xc_params.n_audio = nAudio;
|
|
566
542
|
|
|
543
|
+
// Iterate through custom settings (which will override any existing setting)
|
|
544
|
+
function SetByPath({obj, path, value}) {
|
|
545
|
+
const keys = path.split(".");
|
|
546
|
+
let temp = obj;
|
|
547
|
+
for(let i = 0; i < keys.length - 1; i++) {
|
|
548
|
+
if(!temp[keys[i]]) {
|
|
549
|
+
temp[keys[i]] = {};
|
|
550
|
+
}
|
|
551
|
+
temp = temp[keys[i]];
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
temp[keys[keys.length - 1]] = value;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
const {metaPathValues} = customSettings;
|
|
558
|
+
|
|
559
|
+
for(let [path, value] of Object.entries(metaPathValues || {})) {
|
|
560
|
+
SetByPath({obj: conf, path, value});
|
|
561
|
+
}
|
|
562
|
+
|
|
567
563
|
return conf;
|
|
568
564
|
}
|
|
569
565
|
}
|
package/src/client/LiveStream.js
CHANGED