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:
@@ -18,7 +18,7 @@ class StreamSession < ApplicationRecord
|
||||
before_validation :normalize_privacy_status
|
||||
before_validation :ensure_publish_token, on: :create
|
||||
|
||||
scope :broadcasting, -> { where(status: %w[live connecting reconnecting]) }
|
||||
scope :broadcasting, -> { where(status: %w[live connecting reconnecting paused]) }
|
||||
scope :publicly_listed, -> { where(privacy_status: "public") }
|
||||
scope :search_by_team_or_opponent, lambda { |query|
|
||||
q = query.to_s.strip
|
||||
@@ -95,18 +95,9 @@ class StreamSession < ApplicationRecord
|
||||
end
|
||||
|
||||
def effective_hls_path_name
|
||||
return mediamtx_path_name if terminal?
|
||||
return mediamtx_overlay_path_name unless Streams::OverlayRelay.running?(id)
|
||||
return mediamtx_overlay_path_name if overlay_air_has_output?
|
||||
|
||||
mediamtx_path_name
|
||||
end
|
||||
|
||||
def overlay_air_has_output?
|
||||
info = Mediamtx::Client.new.list_paths.find { |i| i["name"] == mediamtx_overlay_path_name }
|
||||
info && (info["online"] || info["ready"] || info["available"])
|
||||
end
|
||||
|
||||
def watch_page_url
|
||||
"#{MatchLiveTv.app_public_url.chomp('/')}/live/#{id}"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user