Fix: use wav-stream-live for train arrivals and departures to fix CC client audio playback
This commit is contained in:
@@ -1288,7 +1288,8 @@ function buildSequenceWavFile(seq) {
|
|||||||
try { fs.unlinkSync(outWavPath); } catch {}
|
try { fs.unlinkSync(outWavPath); } catch {}
|
||||||
}, Math.max(10 * 60 * 1000, Math.ceil(durationSec * 2000)));
|
}, Math.max(10 * 60 * 1000, Math.ceil(durationSec * 2000)));
|
||||||
return {
|
return {
|
||||||
audioFormat: 'stream',
|
audioFormat: 'wav-stream-live',
|
||||||
|
sourcePath: outWavPath,
|
||||||
streamUrl: getManagedMediaUrl('temp', fileName),
|
streamUrl: getManagedMediaUrl('temp', fileName),
|
||||||
durationSec
|
durationSec
|
||||||
};
|
};
|
||||||
@@ -1875,6 +1876,7 @@ function handleTrainArrival(ws, data) {
|
|||||||
if (built) {
|
if (built) {
|
||||||
enqueueStationAudioTask(stationName, ws, {
|
enqueueStationAudioTask(stationName, ws, {
|
||||||
audioFormat: built.audioFormat,
|
audioFormat: built.audioFormat,
|
||||||
|
sourcePath: built.sourcePath,
|
||||||
streamUrl: built.streamUrl,
|
streamUrl: built.streamUrl,
|
||||||
durationSec: built.durationSec,
|
durationSec: built.durationSec,
|
||||||
priority: 1,
|
priority: 1,
|
||||||
@@ -1923,6 +1925,7 @@ function handleTrainDeparture(ws, data) {
|
|||||||
if (built) {
|
if (built) {
|
||||||
enqueueStationAudioTask(stationName, ws, {
|
enqueueStationAudioTask(stationName, ws, {
|
||||||
audioFormat: built.audioFormat,
|
audioFormat: built.audioFormat,
|
||||||
|
sourcePath: built.sourcePath,
|
||||||
streamUrl: built.streamUrl,
|
streamUrl: built.streamUrl,
|
||||||
durationSec: built.durationSec,
|
durationSec: built.durationSec,
|
||||||
priority: 1,
|
priority: 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user