Package nl.harm27.obswebsocket.sender
Class StreamingRequestSender
- java.lang.Object
-
- nl.harm27.obswebsocket.sender.RequestSender
-
- nl.harm27.obswebsocket.sender.StreamingRequestSender
-
public class StreamingRequestSender extends RequestSender
The RequestSender for the requests that are part of the Streaming category.
-
-
Constructor Summary
Constructors Constructor Description StreamingRequestSender(OBSWebSocket obsWebSocket)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
getStreamingStatus(Consumer<GetStreamingStatus.Response> responseConsumer)
Get current streaming and recording status.void
getStreamSettings(Consumer<GetStreamSettings.Response> responseConsumer)
Get the current streaming server settings.void
saveStreamSettings(Consumer<SaveStreamSettings.Response> responseConsumer)
Save the current streaming server settings to disk.void
sendCaptions(String text, Consumer<SendCaptions.Response> responseConsumer)
Send the provided text as embedded CEA-608 caption data.void
setStreamSettings(String type, StreamSettings settings, boolean save, Consumer<SetStreamSettings.Response> responseConsumer)
Sets one or more attributes of the current streaming server settings.void
startStopStreaming(Consumer<StartStopStreaming.Response> responseConsumer)
Toggle streaming on or off.void
startStreaming(StartStreaming.Stream stream, Consumer<StartStreaming.Response> responseConsumer)
Start streaming.void
stopStreaming(Consumer<StopStreaming.Response> responseConsumer)
Stop streaming.-
Methods inherited from class nl.harm27.obswebsocket.sender.RequestSender
getNextMessageId, sendRequest
-
-
-
-
Constructor Detail
-
StreamingRequestSender
public StreamingRequestSender(OBSWebSocket obsWebSocket)
-
-
Method Detail
-
getStreamingStatus
public void getStreamingStatus(Consumer<GetStreamingStatus.Response> responseConsumer)
Get current streaming and recording status.- Since:
- v0.3
- See Also:
- OBS WebSocket Documentation
-
startStopStreaming
public void startStopStreaming(Consumer<StartStopStreaming.Response> responseConsumer)
Toggle streaming on or off.- Since:
- v0.3
- See Also:
- OBS WebSocket Documentation
-
startStreaming
public void startStreaming(StartStreaming.Stream stream, Consumer<StartStreaming.Response> responseConsumer)
Start streaming. Will return an error if streaming is already active.- Since:
- v4.1.0
- See Also:
- OBS WebSocket Documentation
-
stopStreaming
public void stopStreaming(Consumer<StopStreaming.Response> responseConsumer)
Stop streaming. Will return an error if streaming is not active.- Since:
- v4.1.0
- See Also:
- OBS WebSocket Documentation
-
setStreamSettings
public void setStreamSettings(String type, StreamSettings settings, boolean save, Consumer<SetStreamSettings.Response> responseConsumer)
Sets one or more attributes of the current streaming server settings. Any options not passed will remain unchanged. Returns the updated settings in response. If 'type' is different than the current streaming service type, all settings are required. Returns the full settings of the stream (the same as GetStreamSettings).- Since:
- v4.1.0
- See Also:
- OBS WebSocket Documentation
-
getStreamSettings
public void getStreamSettings(Consumer<GetStreamSettings.Response> responseConsumer)
Get the current streaming server settings.- Since:
- v4.1.0
- See Also:
- OBS WebSocket Documentation
-
saveStreamSettings
public void saveStreamSettings(Consumer<SaveStreamSettings.Response> responseConsumer)
Save the current streaming server settings to disk.- Since:
- v4.1.0
- See Also:
- OBS WebSocket Documentation
-
sendCaptions
public void sendCaptions(String text, Consumer<SendCaptions.Response> responseConsumer)
Send the provided text as embedded CEA-608 caption data. As of OBS Studio 23.1, captions are not yet available on Linux.- Since:
- v4.6.0
- See Also:
- OBS WebSocket Documentation
-
-