File tree Expand file tree Collapse file tree
src/backend/integrations/builtin/obs Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,3 +28,4 @@ export const OBS_INPUT_AUDIO_TRACKS_CHANGED_EVENT_ID = "input-audio-tracks-chang
2828export const OBS_INPUT_AUDIO_MONITOR_TYPE_CHANGED_EVENT_ID = "input-audio-monitor-type-changed" ;
2929export const OBS_CONNECTED_EVENT_ID = "connected" ;
3030export const OBS_DISCONNECTED_EVENT_ID = "disconnected" ;
31+ export const OBS_EXITING_EVENT_ID = "exiting" ;
Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ import {
2929 OBS_INPUT_AUDIO_BALANCE_CHANGED_EVENT_ID ,
3030 OBS_INPUT_AUDIO_SYNC_OFFSET_CHANGED_EVENT_ID ,
3131 OBS_INPUT_AUDIO_MONITOR_TYPE_CHANGED_EVENT_ID ,
32- OBS_INPUT_AUDIO_TRACKS_CHANGED_EVENT_ID
32+ OBS_INPUT_AUDIO_TRACKS_CHANGED_EVENT_ID ,
33+ OBS_EXITING_EVENT_ID
3334} from "../constants" ;
3435
3536export const OBSEventSource : EventSource = {
@@ -288,6 +289,11 @@ export const OBSEventSource: EventSource = {
288289 value : "OBS_MONITORING_TYPE_NONE"
289290 }
290291 }
292+ } ,
293+ {
294+ id : OBS_EXITING_EVENT_ID ,
295+ name : "OBS Exiting" ,
296+ description : "When OBS signals that it is exiting/closing"
291297 }
292298 ]
293299} ;
Original file line number Diff line number Diff line change @@ -30,7 +30,8 @@ import {
3030 OBS_INPUT_AUDIO_MONITOR_TYPE_CHANGED_EVENT_ID ,
3131 OBS_INPUT_AUDIO_TRACKS_CHANGED_EVENT_ID ,
3232 OBS_CONNECTED_EVENT_ID ,
33- OBS_DISCONNECTED_EVENT_ID
33+ OBS_DISCONNECTED_EVENT_ID ,
34+ OBS_EXITING_EVENT_ID
3435} from "./constants" ;
3536import logger from "../../../logwrapper" ;
3637
@@ -402,6 +403,14 @@ async function setupRemoteListeners() {
402403 ) ;
403404 } ) ;
404405
406+ obs . on ( "ExitStarted" , ( ) => {
407+ eventManager ?. triggerEvent (
408+ OBS_EVENT_SOURCE_ID ,
409+ OBS_EXITING_EVENT_ID ,
410+ { }
411+ ) ;
412+ } ) ;
413+
405414 obs . on ( "CurrentSceneCollectionChanged" , async ( ) => {
406415 await refreshGroupsAndScenes ( ) ;
407416 } ) ;
You can’t perform that action at this time.
0 commit comments