Skip to content

Commit 5765dff

Browse files
committed
Fixed: OBS Start/Stop action
1 parent 77fe75e commit 5765dff

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

apps/frontend/src/app/actions/obs-studio/togglestreaming/classes.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export class OBSToggleStreaming extends Action {
1717
constructor(mode: StartOrStop = StartOrStop.Start, id: string = uuid()) {
1818
super(ActionType.OBSStartStopStream, id);
1919
this.mode = mode;
20+
this.target = ToggleTarget.Streaming;
2021
}
2122

2223
setOBSContext = (obsContext: Partial<IOBSStudioContext>) => this.OBSStudio = obsContext;
@@ -33,13 +34,13 @@ export class OBSToggleStreaming extends Action {
3334
}
3435

3536
export enum StartOrStop {
36-
Start,
37-
Stop,
38-
Toggle,
37+
Start = "START",
38+
Stop = "STOP",
39+
Toggle = "TOGGLE",
3940
}
4041

4142
export enum ToggleTarget {
42-
Streaming,
43-
Recording,
44-
ReplayBuffer
43+
Streaming = "STREAM",
44+
Recording = "RECORD",
45+
ReplayBuffer = "REPLAY"
4546
}

apps/frontend/src/app/contexts/macro/runner.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ export class MacroRunner extends EventEmitter {
9494
case ActionType.OBSSaveReplayBuffer:
9595
case ActionType.OBSToggleMixer:
9696
(raw as OBSSwitchScene).setOBSContext(contexts.obsStudio);
97+
console.log(raw)
9798
this.actions.push(raw)
9899
break;
99100
default:

apps/frontend/src/app/contexts/obs-studio/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ const OBSStudioProvider = (props) => {
223223
}, [ isConnected ])
224224

225225
const toggleRecording = React.useCallback((mode: StartOrStop): Promise<void> => {
226+
console.log(mode)
226227
if (!isConnected) return;
227228
if (mode === StartOrStop.Start) return obs.current.send('StartRecording');
228229
if (mode === StartOrStop.Stop) return obs.current.send('StopRecording')

0 commit comments

Comments
 (0)