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:
@@ -165,7 +165,11 @@ class _CameraScreenState extends ConsumerState<CameraScreen> {
|
||||
fresh.status == 'live' ||
|
||||
fresh.status == 'reconnecting');
|
||||
if (shouldAutoPublish) {
|
||||
await Future<void>.delayed(const Duration(milliseconds: 500));
|
||||
// Reset motore nativo (sessione precedente / RECONNECTING blocca startStream).
|
||||
try {
|
||||
await StreamingChannel.stopStream();
|
||||
} catch (_) {}
|
||||
await Future<void>.delayed(const Duration(milliseconds: 400));
|
||||
final useFreshStart =
|
||||
justStartedSession || fresh.status == 'connecting';
|
||||
if (useFreshStart) {
|
||||
@@ -497,6 +501,7 @@ class _CameraScreenState extends ConsumerState<CameraScreen> {
|
||||
_statsTimer?.cancel();
|
||||
_scorePullTimer?.cancel();
|
||||
_metricsSub?.cancel();
|
||||
unawaited(StreamingChannel.stopStream());
|
||||
WakelockPlus.disable();
|
||||
_unlockOrientation();
|
||||
super.dispose();
|
||||
|
||||
Reference in New Issue
Block a user