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

@@ -0,0 +1,33 @@
require "rails_helper"
RSpec.describe Scoring::SyncState do
let!(:user) { User.create!(email: "sync@test.it", name: "U", password: "password123", role: "coach") }
let!(:club) { Club.create!(name: "C", sport: "volleyball", primary_color: "#e53935", secondary_color: "#ffffff") }
let!(:team) { club.teams.create!(name: "T", sport: "volleyball") }
let!(:match) { team.matches.create!(opponent_name: "Opp", sport: "volleyball", sets_to_win: 3) }
let!(:session) { StreamSession.create!(match: match, user: user, platform: "matchlivetv", status: "live") }
it "persiste punti zero dopo chiusura set" do
session.create_score_state!(
home_sets: 1, away_sets: 0, home_points: 25, away_points: 20, current_set: 2,
set_partials: [{ "set" => 1, "home" => 25, "away" => 20 }]
)
described_class.new(
session: session,
payload: {
"home_sets" => 1,
"away_sets" => 0,
"home_points" => 0,
"away_points" => 0,
"current_set" => 2,
"set_partials" => [{ "set" => 1, "home" => 25, "away" => 20 }]
}
).call
score = session.score_state.reload
expect(score.home_points).to eq(0)
expect(score.away_points).to eq(0)
expect(score.current_set).to eq(2)
end
end