Mantiene la copertina YouTube se il telefono cade e avvia ffmpeg sul nodo, non via SSH.
Il relay HLS→RTMPS resta sul worker/agent del nodo assegnato, così tre dirette contemporanee restano in onda sul sito e sul canale della società senza schermo nero. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -225,4 +225,34 @@ RSpec.describe "Public regia", type: :request do
|
||||
expect(tel["thermal_state"]).to eq("nominal")
|
||||
expect(tel).to have_key("publisher_online")
|
||||
end
|
||||
|
||||
it "legge publisher_online dal MediaMTX del nodo assegnato" do
|
||||
node = StreamNode.create!(
|
||||
slug: "ingest-regia-cloud",
|
||||
hostname: "ingest-regia-cloud.mltv-stream.net",
|
||||
role: "cloud",
|
||||
status: "ready",
|
||||
provider: "hetzner",
|
||||
rtmp_base_url: "rtmp://ingest-regia-cloud.mltv-stream.net:1935",
|
||||
hls_base_url: "http://localhost:3000/hls",
|
||||
api_base_url: "http://203.0.113.9:9997",
|
||||
internal_hls_url: "http://203.0.113.9:8888",
|
||||
max_publishers: 4,
|
||||
max_relays: 4
|
||||
)
|
||||
session.update!(stream_node: node)
|
||||
home_client = instance_double(Mediamtx::Client, list_paths: [])
|
||||
cloud_client = instance_double(
|
||||
Mediamtx::Client,
|
||||
list_paths: [{ "name" => session.mediamtx_path_name, "online" => true, "ready" => true }]
|
||||
)
|
||||
allow(Mediamtx::Client).to receive(:new).and_call_original
|
||||
allow(Mediamtx::Client).to receive(:new).with(hash_including(base_url: MatchLiveTv.mediamtx_api_url)).and_return(home_client)
|
||||
allow(Mediamtx::Client).to receive(:new).with(hash_including(base_url: "http://203.0.113.9:9997")).and_return(cloud_client)
|
||||
|
||||
token = Sessions::RegiaAccess.new(session).issue_token!
|
||||
get public_regia_status_path(token)
|
||||
expect(response).to have_http_status(:ok)
|
||||
expect(response.parsed_body["publisher_online"]).to eq(true)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user