Fix HLS browser in prod e stabilizza broadcast RTMP su iOS.
Il proxy Rails gestisce il redirect MediaMTX su /live/match_* e riscrive le playlist; edge nginx reindirizza /live/ sotto /hls/. Su iOS, SessionBuilder HaishinKit, pipeline mixer corretta e refresh token. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
ed0f913138
commit
a303a94671
@@ -79,7 +79,12 @@ struct BroadcastScreen: View {
|
||||
.onChange(of: scoreController.lastActionError) { message in
|
||||
if let message { snackbarMessage = message }
|
||||
}
|
||||
.onChange(of: broadcastCoordinator.metrics.phase) { _ in updateOverlay() }
|
||||
.onChange(of: broadcastCoordinator.metrics.phase) { phase in
|
||||
updateOverlay()
|
||||
if phase == .error, let message = broadcastCoordinator.metrics.lastError {
|
||||
self.error = message
|
||||
}
|
||||
}
|
||||
.alert("Errore", isPresented: Binding(get: { error != nil }, set: { if !$0 { error = nil } })) {
|
||||
Button("OK") { onFinished() }
|
||||
} message: {
|
||||
@@ -287,18 +292,19 @@ struct BroadcastScreen: View {
|
||||
match = loadedMatch
|
||||
container.scoreController.bind(sessionId: sessionId, initial: loaded.score)
|
||||
wireCable()
|
||||
await preloadLogos(for: loadedMatch)
|
||||
loading = false
|
||||
updateOverlay()
|
||||
try? await Task.sleep(nanoseconds: 100_000_000)
|
||||
if let url = loaded.rtmpIngestUrl, !url.isEmpty {
|
||||
let config = broadcastConfig(for: loaded, rtmpUrl: url)
|
||||
if loaded.isPaused {
|
||||
try await container.broadcastCoordinator.engine.preparePreview(config: config)
|
||||
} else {
|
||||
try await container.broadcastCoordinator.startBroadcast(config: config)
|
||||
try await container.broadcastCoordinator.engine.prepareForBroadcast(config: config)
|
||||
}
|
||||
}
|
||||
await preloadLogos(for: loadedMatch)
|
||||
startPolling()
|
||||
loading = false
|
||||
updateOverlay()
|
||||
} catch {
|
||||
if let message = UserFacingError.message(for: error) {
|
||||
self.error = message
|
||||
|
||||
Reference in New Issue
Block a user