Stabilizza live YouTube/RTMP e fix crash rotazione mobile.

Pipeline YouTube con relay, overlay e publisher sync lato backend; fix GL pauseGlDuringRotation su Android per evitare crash in rotazione durante lo streaming Flutter.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-06 15:30:55 +02:00
parent 1058c644bd
commit 854738b46d
65 changed files with 2606 additions and 579 deletions

View File

@@ -44,7 +44,12 @@ class SessionNotifier extends StateNotifier<SessionState> {
SessionNotifier() : super(const SessionState());
void setSession(StreamSession session, {MatchModel? match}) {
state = state.copyWith(session: session, match: match);
final prevId = state.session?.id;
state = state.copyWith(
session: session,
match: match,
elapsed: prevId != null && prevId != session.id ? Duration.zero : state.elapsed,
);
}
void updateYoutubeLinks({
@@ -111,8 +116,6 @@ class SessionNotifier extends StateNotifier<SessionState> {
state = state.copyWith(cameraDevice: device);
return;
}
final startedAt = s.startedAt ??
((incoming == 'live' || incoming == 'reconnecting') ? DateTime.now() : null);
state = state.copyWith(
session: StreamSession(
id: s.id,
@@ -129,7 +132,7 @@ class SessionNotifier extends StateNotifier<SessionState> {
privacyStatus: s.privacyStatus,
qualityPreset: s.qualityPreset,
targetBitrate: s.targetBitrate,
startedAt: startedAt,
startedAt: s.startedAt,
disconnectionCount: s.disconnectionCount,
score: s.score,
devices: s.devices,