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.Builderauthenticate()Attempt to authenticate the client to the server.BroadcastCustomMessage.BuilderbroadcastCustomMessage()Broadcast custom message to all connected WebSocket clientsExecuteBatch.BuilderexecuteBatch()Executes a list of requests sequentially (one-by-one on the same thread).GetAuthRequired.BuildergetAuthRequired()Tells the client if authentication is required.GetFilenameFormatting.BuildergetFilenameFormatting()Get the filename formatting stringGetStats.BuildergetStats()Get OBS stats (almost the same info as provided in OBS' stats window)GetVersion.BuildergetVersion()Returns the latest version of the plugin and the API.GetVideoInfo.BuildergetVideoInfo()Get basic OBS video informationOpenProjector.BuilderopenProjector()Open a projector window or create a projector on a monitor.SetFilenameFormatting.BuildersetFilenameFormatting()Set the filename formatting stringSetHeartbeat.BuildersetHeartbeat()Deprecated.Since 4.9.0.Sleep.Buildersleep()Waits for the specified duration.TriggerHotkeyByName.BuildertriggerHotkeyByName()Executes hotkey routine, identified by hotkey unique nameTriggerHotkeyBySequence.BuildertriggerHotkeyBySequence()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
-
-