Package nl.harm27.obs.websocket.sender
Class GeneralRequestSender
- java.lang.Object
-
- nl.harm27.obs.websocket.sender.RequestSender
-
- nl.harm27.obs.websocket.sender.GeneralRequestSender
-
public class GeneralRequestSender extends RequestSender
-
-
Constructor Summary
Constructors Constructor Description GeneralRequestSender(BiConsumer<BaseRequest,Consumer<BaseResponse>> requestConsumer, Consumer<BaseRequest> batchConsumer, Supplier<String> messageIdSupplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Authenticate.Builder
authenticate()
Attempt to authenticate the client to the server.BroadcastCustomMessage.Builder
broadcastCustomMessage()
Broadcast custom message to all connected WebSocket clientsExecuteBatch.Builder
executeBatch()
Executes a list of requests sequentially (one-by-one on the same thread).GetAuthRequired.Builder
getAuthRequired()
Tells the client if authentication is required.GetFilenameFormatting.Builder
getFilenameFormatting()
Get the filename formatting stringGetStats.Builder
getStats()
Get OBS stats (almost the same info as provided in OBS' stats window)GetVersion.Builder
getVersion()
Returns the latest version of the plugin and the API.GetVideoInfo.Builder
getVideoInfo()
Get basic OBS video informationOpenProjector.Builder
openProjector()
Open a projector window or create a projector on a monitor.SetFilenameFormatting.Builder
setFilenameFormatting()
Set the filename formatting stringSetHeartbeat.Builder
setHeartbeat()
Deprecated.Since 4.9.0.Sleep.Builder
sleep()
Waits for the specified duration.TriggerHotkeyByName.Builder
triggerHotkeyByName()
Executes hotkey routine, identified by hotkey unique nameTriggerHotkeyBySequence.Builder
triggerHotkeyBySequence()
Executes hotkey routine, identified by bound combination of keys.-
Methods inherited from class nl.harm27.obs.websocket.sender.RequestSender
batchMessage, getNewMessageId, sendMessage
-
-
-
-
Constructor Detail
-
GeneralRequestSender
public GeneralRequestSender(BiConsumer<BaseRequest,Consumer<BaseResponse>> requestConsumer, Consumer<BaseRequest> batchConsumer, Supplier<String> messageIdSupplier)
-
-
Method Detail
-
getVersion
public GetVersion.Builder getVersion()
Returns the latest version of the plugin and the API.- Since:
- 0.3
- See Also:
- OBS WebSocket Documentation
-
getAuthRequired
public GetAuthRequired.Builder getAuthRequired()
Tells the client if authentication is required. If so, returns authentication parameters `challenge` and `salt` (see "Authentication" for more information).- Since:
- 0.3
- See Also:
- OBS WebSocket Documentation
-
authenticate
public Authenticate.Builder authenticate()
Attempt to authenticate the client to the server.- Since:
- 0.3
- See Also:
- OBS WebSocket Documentation
-
setHeartbeat
public SetHeartbeat.Builder setHeartbeat()
Deprecated.Since 4.9.0. Please poll the appropriate data using requests. Will be removed in v5.0.0.Enable/disable sending of the Heartbeat event- Since:
- 4.3.0
- See Also:
- OBS WebSocket Documentation
-
setFilenameFormatting
public SetFilenameFormatting.Builder setFilenameFormatting()
Set the filename formatting string- Since:
- 4.3.0
- See Also:
- OBS WebSocket Documentation
-
getFilenameFormatting
public GetFilenameFormatting.Builder getFilenameFormatting()
Get the filename formatting string- Since:
- 4.3.0
- See Also:
- OBS WebSocket Documentation
-
getStats
public GetStats.Builder getStats()
Get OBS stats (almost the same info as provided in OBS' stats window)- Since:
- 4.6.0
- See Also:
- OBS WebSocket Documentation
-
broadcastCustomMessage
public BroadcastCustomMessage.Builder broadcastCustomMessage()
Broadcast custom message to all connected WebSocket clients- Since:
- 4.7.0
- See Also:
- OBS WebSocket Documentation
-
getVideoInfo
public GetVideoInfo.Builder getVideoInfo()
Get basic OBS video information- Since:
- 4.6.0
- See Also:
- OBS WebSocket Documentation
-
openProjector
public OpenProjector.Builder openProjector()
Open a projector window or create a projector on a monitor. Requires OBS v24.0.4 or newer.- Since:
- 4.8.0
- See Also:
- OBS WebSocket Documentation
-
triggerHotkeyByName
public TriggerHotkeyByName.Builder triggerHotkeyByName()
Executes hotkey routine, identified by hotkey unique name- Since:
- 4.9.0
- See Also:
- OBS WebSocket Documentation
-
triggerHotkeyBySequence
public TriggerHotkeyBySequence.Builder triggerHotkeyBySequence()
Executes hotkey routine, identified by bound combination of keys. A single key combination might trigger multiple hotkey routines depending on user settings- Since:
- 4.9.0
- See Also:
- OBS WebSocket Documentation
-
executeBatch
public ExecuteBatch.Builder executeBatch()
Executes a list of requests sequentially (one-by-one on the same thread).- Since:
- 4.9.0
- See Also:
- OBS WebSocket Documentation
-
sleep
public Sleep.Builder sleep()
Waits for the specified duration. Designed to be used in `ExecuteBatch` operations.- Since:
- 4.9.1
- See Also:
- OBS WebSocket Documentation
-
-