Aggiunge overlay server-side burn-in e stabilizza diretta live.

Tabellone, badge e brand sono ricodificati nel flusso _air via OverlayRelay;
sync punteggio HTTP, volume condiviso rails/sidekiq, qualità 720p migliorata
e badge CONNECTING in ripresa da pausa.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-03 23:55:17 +02:00
parent fd225fbadd
commit ab9cb02083
58 changed files with 2423 additions and 242 deletions

View File

@@ -7,10 +7,11 @@ module Sessions
def call
cancel_timeout_job
@session.pause! if @session.may_pause?
ensure_slate_on_path
# Slate già su path (create_path + alwaysAvailable): stop RTMP basta, senza patch API.
log_event("paused")
SessionChannel.broadcast_message(@session, { type: "command", action: "pause_stream" })
SessionChannel.broadcast_message(@session, { type: "stream_event", event: "paused" })
Streams::Overlay::Refresh.call(@session)
@session
end
@@ -23,12 +24,6 @@ module Sessions
@session.update!(timeout_job_id: nil)
end
def ensure_slate_on_path
Mediamtx::Client.new.patch_path(@session)
rescue Mediamtx::Client::Error => e
Rails.logger.warn("[Sessions::Pause] slate path patch failed: #{e.message}")
end
def log_event(type)
@session.stream_events.create!(event_type: type, occurred_at: Time.current, metadata: {})
end