Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5e3f906
Merge pull request #2335 from crowbartools/v5
zunderscore Jan 5, 2024
38b86cc
v5.61.0
SReject Feb 16, 2024
0049b51
Merge pull request #2406 from crowbartools/v5
zunderscore Feb 16, 2024
bc18f3d
Merge pull request #2409 from crowbartools/v5
zunderscore Feb 18, 2024
54bdec2
Merge pull request #2479 from crowbartools/v5
zunderscore Mar 23, 2024
e792184
Merge pull request #2486 from crowbartools/v5
zunderscore Mar 25, 2024
4a22639
Add a chatMessageTextOnly variable
phroggster May 8, 2024
3990d3a
Feat: Add $chatMessageTextOnly variable
SReject Jun 29, 2024
a4e0d1f
Revert "Feat: Add $chatMessageTextOnly variable"
SReject Jun 29, 2024
e743923
Revert "Feat: Add $chatMessageTextOnly variable"
SReject Jun 29, 2024
2245c58
`is-connected` file created
Oceanity Jul 12, 2024
041de94
Revert "Feat: Add $chatMessageTextOnly variable"
SReject Jun 29, 2024
4c1d022
`is-connected` file created
Oceanity Jul 12, 2024
aa87002
Merge branch 'feature/obs-is-connected-var' of https://github.com/Oce…
Oceanity Jul 12, 2024
846fe9e
Implemented `obsIsConnected` Replace Variable
Oceanity Jul 15, 2024
8436397
one-lined the isConnected function because I can, knowing full well i…
Oceanity Jul 15, 2024
d7e8705
Merge remote-tracking branch 'upstream/v5' into feature/obs-is-connec…
Oceanity Jul 15, 2024
bcb166b
Revert "Feat: Add $chatMessageTextOnly variable"
SReject Jun 29, 2024
3b66d9d
`is-connected` file created
Oceanity Jul 12, 2024
2ecfcb4
Add a chatMessageTextOnly variable
phroggster May 8, 2024
db87109
Revert "Feat: Add $chatMessageTextOnly variable"
SReject Jun 29, 2024
f00a782
Implemented `obsIsConnected` Replace Variable
Oceanity Jul 15, 2024
c5e0584
one-lined the isConnected function because I can, knowing full well i…
Oceanity Jul 15, 2024
b8c6116
Merge branch 'feature/obs-is-connected-var' of https://github.com/Oce…
Oceanity Jul 15, 2024
1e680bd
Merge conflict resolution
Oceanity Jul 15, 2024
60620a8
Comment Resolution
Oceanity Jul 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/backend/integrations/builtin/obs/obs-integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import { SceneNameEventFilter } from "./filters/scene-name-filter";

import { SceneNameVariable } from "./variables/scene-name-variable";
import { SceneCollectionNameVariable } from "./variables/scene-collection-name";
import { IsConnectedVariable } from "./variables/is-connected";
import { IsStreamingVariable } from "./variables/is-streaming";
import { IsRecordingVariable } from "./variables/is-recording";
import { ColorValueVariable } from "./variables/obs-color-value";
Expand Down Expand Up @@ -158,6 +159,7 @@ class ObsIntegration

replaceVariableManager.registerReplaceVariable(SceneNameVariable);
replaceVariableManager.registerReplaceVariable(SceneCollectionNameVariable);
replaceVariableManager.registerReplaceVariable(IsConnectedVariable);
replaceVariableManager.registerReplaceVariable(IsStreamingVariable);
replaceVariableManager.registerReplaceVariable(IsRecordingVariable);
replaceVariableManager.registerReplaceVariable(ColorValueVariable);
Expand Down
2 changes: 2 additions & 0 deletions src/backend/integrations/builtin/obs/obs-remote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,8 @@ export async function stopVirtualCam(): Promise<void> {
}
}

export const isConnected = (): boolean => connected;

export async function isStreaming(): Promise<boolean> {
let isRunning = false;
if (!connected) {
Expand Down
13 changes: 13 additions & 0 deletions src/backend/integrations/builtin/obs/variables/is-connected.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { ReplaceVariable } from "../../../../../types/variables";
import { isConnected } from "../obs-remote";

export const IsConnectedVariable: ReplaceVariable = {
definition: {
handle: "obsIsConnected",
description: "Returns 'true' if OBS is currently connected or 'false' if it is not.",
possibleDataOutput: ["text"]
},
evaluator: async () => {
return isConnected() ?? false;
}
};