refactor(playout): rename web_stream variables
This commit is contained in:
parent
676aabe046
commit
c95733191a
|
@ -15,13 +15,13 @@ def notify_queue(m)
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify_stream(m)
|
def notify_stream(m)
|
||||||
if !current_dyn_id != "-1" then
|
if !web_stream_id != "-1" then
|
||||||
json_str = string.replace(pattern="\n",(fun (s) -> ""), json_of(m))
|
json_str = string.replace(pattern="\n",(fun (s) -> ""), json_of(m))
|
||||||
#if a string has a single apostrophe in it, let's comment it out by ending the string before right before it
|
#if a string has a single apostrophe in it, let's comment it out by ending the string before right before it
|
||||||
#escaping the apostrophe, and then starting a new string right after it. This is why we use 3 apostrophes.
|
#escaping the apostrophe, and then starting a new string right after it. This is why we use 3 apostrophes.
|
||||||
json_str = string.replace(pattern="'",(fun (s) -> "'\''"), json_str)
|
json_str = string.replace(pattern="'",(fun (s) -> "'\''"), json_str)
|
||||||
|
|
||||||
gateway("webstream '#{!current_dyn_id}' '#{json_str}'")
|
gateway("webstream '#{!web_stream_id}' '#{json_str}'")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -234,12 +234,12 @@ def clear_queue(s)
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_dynamic_source_id(id) =
|
def set_dynamic_source_id(id) =
|
||||||
current_dyn_id := id
|
web_stream_id := id
|
||||||
string_of(!current_dyn_id)
|
string_of(!web_stream_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_dynamic_source_id() =
|
def get_dynamic_source_id() =
|
||||||
string_of(!current_dyn_id)
|
string_of(!web_stream_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
#cc-4633
|
#cc-4633
|
||||||
|
@ -393,7 +393,7 @@ def http_fallback(~http_input_id,~http,~default)
|
||||||
track_sensitive=false,
|
track_sensitive=false,
|
||||||
transitions=[to_live,to_static],
|
transitions=[to_live,to_static],
|
||||||
[(# make sure it is connected, and not buffering
|
[(# make sure it is connected, and not buffering
|
||||||
{connected() and source.is_ready(http) and !webstream_enabled}, http),
|
{connected() and source.is_ready(http) and !web_stream_enabled}, http),
|
||||||
({true},default)])
|
({true},default)])
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,9 +2,8 @@ boot_timestamp = interactive.string("boot_timestamp", string_of(gettimeofday()))
|
||||||
|
|
||||||
#Dynamic source list
|
#Dynamic source list
|
||||||
#dyn_sources = ref []
|
#dyn_sources = ref []
|
||||||
webstream_enabled = ref false
|
web_stream_enabled = ref false
|
||||||
|
web_stream_id = ref '-1'
|
||||||
current_dyn_id = ref '-1'
|
|
||||||
|
|
||||||
show_name = interactive.string("show_name", "")
|
show_name = interactive.string("show_name", "")
|
||||||
|
|
||||||
|
@ -85,13 +84,13 @@ server.register(namespace="dynamic_source",
|
||||||
usage='start',
|
usage='start',
|
||||||
"output_start",
|
"output_start",
|
||||||
fun (s) -> begin log("dynamic_source.output_start")
|
fun (s) -> begin log("dynamic_source.output_start")
|
||||||
notify([("schedule_table_id", !current_dyn_id)])
|
notify([("schedule_table_id", !web_stream_id)])
|
||||||
webstream_enabled := true "enabled" end)
|
web_stream_enabled := true "enabled" end)
|
||||||
server.register(namespace="dynamic_source",
|
server.register(namespace="dynamic_source",
|
||||||
description="Enable webstream output",
|
description="Enable webstream output",
|
||||||
usage='stop',
|
usage='stop',
|
||||||
"output_stop",
|
"output_stop",
|
||||||
fun (s) -> begin log("dynamic_source.output_stop") webstream_enabled := false "disabled" end)
|
fun (s) -> begin log("dynamic_source.output_stop") web_stream_enabled := false "disabled" end)
|
||||||
|
|
||||||
server.register(namespace="dynamic_source",
|
server.register(namespace="dynamic_source",
|
||||||
description="Set the streams cc_schedule row id",
|
description="Set the streams cc_schedule row id",
|
||||||
|
|
Loading…
Reference in New Issue