feat: no auto-mute

This commit is contained in:
Klesh Wong 2022-07-30 10:16:21 +08:00
parent 5f3e3c1456
commit 757dd894b7

View File

@ -73,21 +73,21 @@ local stage = "stopped"
NewHttpServer("127.0.0.1", 10200, { NewHttpServer("127.0.0.1", 10200, {
["POST /prepare"] = function(_, _) ["POST /prepare"] = function(_, _)
if stage == "stopped" then if stage == "stopped" then
run("pactl set-source-mute @DEFAULT_SOURCE@ 1") -- run("pactl set-source-mute @DEFAULT_SOURCE@ 1")
run_only(Actualcam) run_only(Actualcam)
stage = "actual" stage = "actual"
end end
end, end,
["POST /actual"] = function(_, _) ["POST /actual"] = function(_, _)
if stage ~= "actual" then if stage ~= "actual" then
run("pactl set-source-mute @DEFAULT_SOURCE@ 0") -- run("pactl set-source-mute @DEFAULT_SOURCE@ 0")
run_only(Actualcam) run_only(Actualcam)
stage = "actual" stage = "actual"
end end
end, end,
["POST /fake"] = function(_, _) ["POST /fake"] = function(_, _)
if stage ~= "fake" then if stage ~= "fake" then
run("pactl set-source-mute @DEFAULT_SOURCE@ 1") -- run("pactl set-source-mute @DEFAULT_SOURCE@ 1")
run_only(Actualcam) run_only(Actualcam)
Recorder:start() Recorder:start()
run("sleep 3") run("sleep 3")