@eluvio/elv-client-js 4.2.33 → 4.2.34
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 +14 -9
- package/src/client/LiveStream.js +28 -0
package/package.json
CHANGED
package/src/client/LiveConf.js
CHANGED
|
@@ -585,17 +585,22 @@ class LiveConf {
|
|
|
585
585
|
customXcParams?.video_seg_duration_ts ?? segDurations.video;
|
|
586
586
|
conf.live_recording.recording_config.recording_params.xc_params.force_keyint = segDurations.keyint;
|
|
587
587
|
|
|
588
|
-
//
|
|
589
|
-
if(
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
588
|
+
// These must be recomputed from scratch on every (re)configuration to avoid stale values
|
|
589
|
+
if(R.isNil(customXcParams?.video_time_base)) {
|
|
590
|
+
if(segDurations.videoTimeBase) {
|
|
591
|
+
conf.live_recording.recording_config.recording_params.xc_params.video_time_base = segDurations.videoTimeBase;
|
|
592
|
+
|
|
593
|
+
// Note 'source_timescale' needs to be set to the output timebase and is used by playout
|
|
594
|
+
if(R.isNil(customRecordingParams?.source_timescale)) {
|
|
595
|
+
conf.live_recording.recording_config.recording_params.source_timescale = this.calcOutputTimebase(segDurations.videoTimeBase);
|
|
596
|
+
}
|
|
597
|
+
} else {
|
|
598
|
+
conf.live_recording.recording_config.recording_params.xc_params.video_time_base = null;
|
|
595
599
|
}
|
|
596
600
|
}
|
|
597
|
-
if(
|
|
598
|
-
conf.live_recording.recording_config.recording_params.xc_params.video_frame_duration_ts =
|
|
601
|
+
if(R.isNil(customXcParams?.video_frame_duration_ts)) {
|
|
602
|
+
conf.live_recording.recording_config.recording_params.xc_params.video_frame_duration_ts =
|
|
603
|
+
segDurations.videoFrameDurationTs || null;
|
|
599
604
|
}
|
|
600
605
|
|
|
601
606
|
const ladder_specs = customSettings.liveRecordingConfigProfile?.playout_config?.ladder_specs;
|
package/src/client/LiveStream.js
CHANGED
|
@@ -1518,6 +1518,34 @@ exports.StreamStartOrStopOrReset = async function({name, op}) {
|
|
|
1518
1518
|
});
|
|
1519
1519
|
} catch(error) {
|
|
1520
1520
|
console.log("LRO Start (failed): ", error);
|
|
1521
|
+
|
|
1522
|
+
// Check for unsupported input conditions before returning
|
|
1523
|
+
// generic "LRO start failed - must create a stream first" error
|
|
1524
|
+
try {
|
|
1525
|
+
const configMeta = await this.ContentObjectMetadata({
|
|
1526
|
+
libraryId: status.libraryId,
|
|
1527
|
+
objectId: status.objectId,
|
|
1528
|
+
metadataSubtree: "live_recording_config",
|
|
1529
|
+
select: [
|
|
1530
|
+
"probe_info",
|
|
1531
|
+
"input_stream_info"
|
|
1532
|
+
]
|
|
1533
|
+
});
|
|
1534
|
+
|
|
1535
|
+
const probeInfo = configMeta?.probe_info || configMeta?.input_stream_info;
|
|
1536
|
+
const unsupportedAudio = (probeInfo?.streams || [])
|
|
1537
|
+
.find(stream => stream.codec_type === "audio" && stream.sample_rate === 44100);
|
|
1538
|
+
|
|
1539
|
+
if(unsupportedAudio) {
|
|
1540
|
+
return {
|
|
1541
|
+
state: status.state,
|
|
1542
|
+
error: "Unsupported audio sample rate: 44.1 kHz. Only 48 kHz audio is supported."
|
|
1543
|
+
};
|
|
1544
|
+
}
|
|
1545
|
+
} catch(probeError) {
|
|
1546
|
+
console.error("Unable to check audio sample rate", probeError);
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1521
1549
|
return {
|
|
1522
1550
|
state: status.state,
|
|
1523
1551
|
error: "LRO start failed - must create a stream first"
|