You've already forked fm-dx-webserver
mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-02-26 14:11:59 +01:00
serialport reconnect rework - v1.3.0.1
This commit is contained in:
committed by
GitHub
parent
8b265ecf71
commit
a7931257d5
@@ -1,3 +1,4 @@
|
||||
var audioStreamRestartInterval;
|
||||
var elapsedTimeConnectionWatchdog;
|
||||
var _3LAS_Settings = /** @class */ (function () {
|
||||
function _3LAS_Settings() {
|
||||
@@ -48,6 +49,20 @@ var _3LAS = /** @class */ (function () {
|
||||
this.ConnectivityFlag = false;
|
||||
this.Stop(); // Attempt to mitigate the 0.5x speed/multiple stream bug
|
||||
|
||||
// Restart audio stream if radio data connection was reestablished
|
||||
// to prevent stuttering audio in some cases
|
||||
if (audioStreamRestartInterval) {
|
||||
clearInterval(audioStreamRestartInterval);
|
||||
}
|
||||
audioStreamRestartInterval = setInterval(() => {
|
||||
if (requiresAudioStreamRestart) {
|
||||
requiresAudioStreamRestart = false;
|
||||
this.Stop();
|
||||
this.Start();
|
||||
console.log("Audio stream restarted after radio data loss.");
|
||||
}
|
||||
}, 3000);
|
||||
|
||||
// Stream connection watchdog monitors mp3 frames
|
||||
console.log("Stream connection watchdog active.");
|
||||
let intervalReconnectWatchdog = setInterval(() => {
|
||||
|
||||
Reference in New Issue
Block a user