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:
Emiliano Frascaro
2026-06-19 18:48:29 +02:00
parent ed0f913138
commit a303a94671
16 changed files with 1092 additions and 319 deletions

View File

@@ -109,6 +109,16 @@ Rails.application.routes.draw do
end
get "hls/*path", to: "hls_proxy#show", format: false, constraints: { path: /.+/ }
# MediaMTX HLS cookie redirect → /live/match_{uuid}/… (edge o browser dopo 302).
get "live/match_:session_id",
to: "hls_proxy#live_match",
format: false,
constraints: { session_id: /[0-9a-f-]{36}/i },
defaults: { segments: "index.m3u8" }
get "live/match_:session_id/*segments",
to: "hls_proxy#live_match",
format: false,
constraints: { session_id: /[0-9a-f-]{36}/i, segments: /.+/ }
get "live", to: "public/live#index", as: :public_live_index
get "live/:id", to: "public/live#show", as: :public_live