From 24ffea5a7f25b179a8b2fb7f3605a4977c854069 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 10 Nov 2026 11:32:06 +0100 Subject: feat(obs): pause, Studio Mode, and working transition tiles The transition tiles listed transition kinds (fade_transition), which SetCurrentSceneTransition rejects and which never matched the current one, so every tile looked inactive. Read GetSceneTransitionList instead. Add a Pause/Resume button, shown while recording, and a Studio toggle. With Studio Mode on, a scene tap cues it in Preview (dashed tile) and the Transition button, shown only then, sends it to Program. Co-Authored-By: Claude Opus 5.5 --- tests/test_obs.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'tests') diff --git a/tests/test_obs.py b/tests/test_obs.py index 48a0274..0c9a1a6 100644 --- a/tests/test_obs.py +++ b/tests/test_obs.py @@ -49,6 +49,35 @@ class Actions(unittest.TestCase): self.m.actions["record"]({"on": False}) self.assertEqual(Fake.last[0], "StopRecord") + def test_scene_cues_preview_in_studio_mode(self): + class Studio(Fake): + def request(self, kind, data=None): + if kind == "GetStudioModeEnabled": + return {"studioModeEnabled": True} + return super().request(kind, data) + obs.make({"client": Studio()}).actions["scene"]({"scene": "Live"}) + self.assertEqual(Fake.last, ("SetCurrentPreviewScene", {"sceneName": "Live"})) + self.m.actions["studio"]({"on": True}) + self.assertEqual(Fake.last, ("SetStudioModeEnabled", {"studioModeEnabled": True})) + + def test_pause_and_resume(self): + self.m.actions["pause"]({"on": True}) + self.assertEqual(Fake.last[0], "PauseRecord") + self.m.actions["pause"]({"on": False}) + self.assertEqual(Fake.last[0], "ResumeRecord") + + def test_transitions_are_names(self): + class Obs(Fake): + def request(self, kind, data=None): + if kind == "GetSceneTransitionList": + return {"currentSceneTransitionName": "Fade", + "transitions": [{"transitionName": "Cut", "transitionKind": "cut_transition"}, + {"transitionName": "Fade", "transitionKind": "fade_transition"}]} + return {} + st = obs.make({"client": Obs()}).state() + self.assertEqual(st["transitions"], ["Cut", "Fade"]) + self.assertEqual(st["transition"], "Fade") + def test_mute_and_source(self): self.m.actions["mute"]({"input": "Mic", "muted": True}) self.assertEqual(Fake.last[0], "SetInputMute") -- cgit v1.2.3