mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
EventHandler: Add ReplayBufferSaved
This commit is contained in:
parent
4503b6ed05
commit
ca26f679c8
@ -229,6 +229,9 @@ void EventHandler::OnFrontendEvent(enum obs_frontend_event event, void *private_
|
||||
case OBS_FRONTEND_EVENT_VIRTUALCAM_STOPPED:
|
||||
eventHandler->HandleVirtualcamStateChanged(OBS_WEBSOCKET_OUTPUT_STOPPED);
|
||||
break;
|
||||
case OBS_FRONTEND_EVENT_REPLAY_BUFFER_SAVED:
|
||||
eventHandler->HandleReplayBufferSaved();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
@ -106,6 +106,7 @@ class EventHandler
|
||||
void HandleRecordStateChanged(ObsOutputState state);
|
||||
void HandleReplayBufferStateChanged(ObsOutputState state);
|
||||
void HandleVirtualcamStateChanged(ObsOutputState state);
|
||||
void HandleReplayBufferSaved();
|
||||
|
||||
// Media Inputs
|
||||
static void HandleMediaInputPlaybackStarted(void *param, calldata_t *data); // Direct callback
|
||||
|
@ -62,3 +62,10 @@ void EventHandler::HandleVirtualcamStateChanged(ObsOutputState state)
|
||||
eventData["outputState"] = GetOutputStateString(state);
|
||||
_webSocketServer->BroadcastEvent(EventSubscription::Outputs, "VirtualcamStateChanged", eventData);
|
||||
}
|
||||
|
||||
void EventHandler::HandleReplayBufferSaved()
|
||||
{
|
||||
json eventData;
|
||||
eventData["savedReplayPath"] = Utils::Obs::StringHelper::GetLastReplayBufferFilePath();
|
||||
_webSocketServer->BroadcastEvent(EventSubscription::Outputs, "ReplayBufferSaved", eventData);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user