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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user