Corregge avvio RTMP bloccato dopo errore o cambio sessione.

Il motore Android ignorava startStream in CONNECTING/RECONNECTING; la camera
ora resetta prima di pubblicare. YouTube relay parte solo con overlay attivo.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-04 07:32:15 +02:00
parent 1d67459bbe
commit 2ccbfea75e
5 changed files with 20 additions and 6 deletions

View File

@@ -231,12 +231,17 @@ class StreamingEngine(
notifyError("StreamingEngine rilasciato")
return
}
if (state == StreamingState.STREAMING ||
state == StreamingState.CONNECTING ||
state == StreamingState.RECONNECTING
// Già in onda sullo stesso endpoint RTMP.
if (state == StreamingState.STREAMING &&
config?.rtmpUrl == streamConfig.rtmpUrl &&
genericStream?.isStreaming == true
) {
return
}
// Nuova sessione o retry dopo errore: reset completo (evita startStream ignorato).
if (state != StreamingState.IDLE && state != StreamingState.PREVIEWING) {
stopStream()
}
config = streamConfig
lastError = null