diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8cd655c1..f94782b9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,22 +12,22 @@ Localization happens on [Crowdin](https://crowdin.com/project/obs-websocket) ### Code Formatting Guidelines -- Function and variable names: snake_case for C names, camelCase for C++ method names +* Function and variable names: snake_case for C names, camelCase for C++ method names -- Request and Event names should use MixedCaps names +* Request and Event names should use MixedCaps names -- Request and Event json properties should use camelCase. For more detailed info on property naming, see [Google's JSON Style Guide](https://google.github.io/styleguide/jsoncstyleguide.xml) +* Request and Event json properties should use camelCase. For more detailed info on property naming, see [Google's JSON Style Guide](https://google.github.io/styleguide/jsoncstyleguide.xml) -- Code is indented with Tabs. Assume they are 8 columns wide +* Code is indented with Tabs. Assume they are 8 columns wide -- 80 columns max code width. (Docs can be larger) +* 80 columns max code width. (Docs can be larger) -- New and updated requests/events must always come with accompanying documentation comments (see existing protocol elements for examples). - These are required to automatically generate the [protocol specification document](docs/generated/protocol.md). +* New and updated requests/events must always come with accompanying documentation comments (see existing protocol elements for examples). +These are required to automatically generate the [protocol specification document](docs/generated/protocol.md). ### Code Best-Practices -- Favor return-early code and avoid wrapping huge portions of code in conditionals. As an example, this: +* Favor return-early code and avoid wrapping huge portions of code in conditionals. As an example, this: ```cpp if (success) { return req->SendOKResponse(); @@ -43,23 +43,23 @@ if (!success) { return req->SendOKResponse(); ``` -- Some example common response/request property names are: - - `sceneName` - The name of a scene - - `sourceName` - The name of a source - - `fromScene` - From a scene - scene name +* Some example common response/request property names are: + * `sceneName` - The name of a scene + * `sourceName` - The name of a source + * `fromScene` - From a scene - scene name ### Commit Guidelines -- Commits follow the 50/72 standard: - - 50 characters max for the commit title (excluding scope name) - - One empty line after the title - - Description wrapped to 72 columns max width per line. +* Commits follow the 50/72 standard: + * 50 characters max for the commit title (excluding scope name) + * One empty line after the title + * Description wrapped to 72 columns max width per line. -- Commit titles: - - Use present tense - - Prefix the title with a "scope" name - - e.g: "CI: fix wrong behaviour when packaging for OS X" - - Typical scopes: CI, General, Requests, Events, Server +* Commit titles: + * Use present tense + * Prefix the title with a "scope" name + * e.g: "CI: fix wrong behaviour when packaging for OS X" + * Typical scopes: CI, General, Requests, Events, Server **Example commit:** @@ -73,10 +73,10 @@ transitions. ### Pull Requests -- Pull Requests must never be based off your fork's main branch (in this case, `4.x-current`). - - Start your work in a newly named branch based on the upstream main one (e.g.: `feature/cool-new-feature`, `bugfix/fix-palakis-mistakes`, ...) +* Pull Requests must never be based off your fork's main branch (in this case, `4.x-current`). + * Start your work in a newly named branch based on the upstream main one (e.g.: `feature/cool-new-feature`, `bugfix/fix-palakis-mistakes`, ...) -- Only open a pull request if you are ready to show off your work. +* Only open a pull request if you are ready to show off your work. -- If your work is not done yet, but for any reason you need to PR it (like collecting discussions, testing with CI, getting testers), - create it as a Draft Pull Request** (open the little arrow menu next to the "Create pull request" button, then select "Create draft pull request"). +* If your work is not done yet, but for any reason you need to PR it (like collecting discussions, testing with CI, getting testers), + create it as a Draft Pull Request (open the little arrow menu next to the "Create pull request" button, then select "Create draft pull request"). \ No newline at end of file diff --git a/docs/partials/introduction.md b/docs/partials/introduction.md index c63a52cd..496363e7 100644 --- a/docs/partials/introduction.md +++ b/docs/partials/introduction.md @@ -2,7 +2,7 @@ # General Introduction Messages are exchanged between the client and the server as JSON objects. -This protocol is based on the original OBS Remote protocol created by Bill Hamilton, with new commands specific to OBS Studio. +This protocol is based on the original OBS Remote protocol created by Bill Hamilton, with new commands specific to OBS Studio. As of v5.0.0, backwards compatability with the protocol will not be kept. # Authentication `obs-websocket` uses SHA256 to transmit credentials. @@ -32,3 +32,5 @@ auth_response_string = secret + challenge auth_response_hash = binary_sha256(auth_response_string) auth_response = base64_encode(auth_response_hash) ``` + +You can also refer to any of the client libraries listed on the [README](README.md) for examples of how to authenticate. diff --git a/docs/partials/requestsHeader.md b/docs/partials/requestsHeader.md index 457ad61b..b73efc0c 100644 --- a/docs/partials/requestsHeader.md +++ b/docs/partials/requestsHeader.md @@ -6,6 +6,6 @@ Requests are sent by the client and require at least the following two fields: Once a request is sent, the server will return a JSON response with at least the following fields: - `message-id` _String_: The client defined identifier specified in the request. - `status` _String_: Response status, will be one of the following: `ok`, `error` -- `error` _String_: An error message accompanying an `error` status. +- `error` _String (Optional)_: An error message accompanying an `error` status. Additional information may be required/returned depending on the request type. See below for more information. diff --git a/src/WSEvents.cpp b/src/WSEvents.cpp index 0f467d9c..0818fada 100644 --- a/src/WSEvents.cpp +++ b/src/WSEvents.cpp @@ -465,6 +465,8 @@ void WSEvents::OnSceneChange() { * The scene list has been modified. * Scenes have been added, removed, or renamed. * + * Note: This event is not fired when the scenes are reordered. + * * @api events * @name ScenesChanged * @category scenes @@ -756,7 +758,7 @@ void WSEvents::OnExit() { } /** - * Emit every 2 seconds. + * Emitted every 2 seconds when stream is active. * * @return {boolean} `streaming` Current streaming state. * @return {boolean} `recording` Current recording state. @@ -863,6 +865,7 @@ void WSEvents::StreamStatus() { * @api events * @name Heartbeat * @category general + * @since v0.3 */ void WSEvents::Heartbeat() { @@ -1427,7 +1430,7 @@ void WSEvents::OnSourceFilterOrderChanged(void* param, calldata_t* data) { * @api events * @name MediaPlaying * @category media - * @since 4.9.0 + * @since unreleased */ void WSEvents::OnMediaPlaying(void* param, calldata_t* data) { auto self = reinterpret_cast(param); @@ -1448,7 +1451,7 @@ void WSEvents::OnMediaPlaying(void* param, calldata_t* data) { * @api events * @name MediaPaused * @category media - * @since 4.9.0 + * @since unreleased */ void WSEvents::OnMediaPaused(void* param, calldata_t* data) { auto self = reinterpret_cast(param); @@ -1469,7 +1472,7 @@ void WSEvents::OnMediaPaused(void* param, calldata_t* data) { * @api events * @name MediaRestarted * @category media - * @since 4.9.0 + * @since unreleased */ void WSEvents::OnMediaRestarted(void* param, calldata_t* data) { auto self = reinterpret_cast(param); @@ -1490,7 +1493,7 @@ void WSEvents::OnMediaRestarted(void* param, calldata_t* data) { * @api events * @name MediaStopped * @category media - * @since 4.9.0 + * @since unreleased */ void WSEvents::OnMediaStopped(void* param, calldata_t* data) { auto self = reinterpret_cast(param); @@ -1511,7 +1514,7 @@ void WSEvents::OnMediaStopped(void* param, calldata_t* data) { * @api events * @name MediaNext * @category media - * @since 4.9.0 + * @since unreleased */ void WSEvents::OnMediaNext(void* param, calldata_t* data) { auto self = reinterpret_cast(param); @@ -1532,7 +1535,7 @@ void WSEvents::OnMediaNext(void* param, calldata_t* data) { * @api events * @name MediaPrevious * @category media - * @since 4.9.0 + * @since unreleased */ void WSEvents::OnMediaPrevious(void* param, calldata_t* data) { auto self = reinterpret_cast(param); @@ -1553,7 +1556,7 @@ void WSEvents::OnMediaPrevious(void* param, calldata_t* data) { * @api events * @name MediaStarted * @category media - * @since 4.9.0 + * @since unreleased */ void WSEvents::OnMediaStarted(void* param, calldata_t* data) { auto self = reinterpret_cast(param); @@ -1574,7 +1577,7 @@ void WSEvents::OnMediaStarted(void* param, calldata_t* data) { * @api events * @name MediaEnded * @category media - * @since 4.9.0 + * @since unreleased */ void WSEvents::OnMediaEnded(void* param, calldata_t* data) { auto self = reinterpret_cast(param); @@ -1585,7 +1588,7 @@ void WSEvents::OnMediaEnded(void* param, calldata_t* data) { } /** - * Scene items have been reordered. + * Scene items within a scene have been reordered. * * @return {String} `scene-name` Name of the scene where items have been reordered. * @return {Array} `scene-items` Ordered list of scene items @@ -1628,7 +1631,7 @@ void WSEvents::OnSceneReordered(void* param, calldata_t* data) { } /** - * An item has been added to the current scene. + * A scene item has been added to a scene. * * @return {String} `scene-name` Name of the scene. * @return {String} `item-name` Name of the item added to the scene. @@ -1661,7 +1664,7 @@ void WSEvents::OnSceneItemAdd(void* param, calldata_t* data) { } /** - * An item has been removed from the current scene. + * A scene item has been removed from a scene. * * @return {String} `scene-name` Name of the scene. * @return {String} `item-name` Name of the item removed from the scene. @@ -1694,7 +1697,7 @@ void WSEvents::OnSceneItemDelete(void* param, calldata_t* data) { } /** - * An item's visibility has been toggled. + * A scene item's visibility has been toggled. * * @return {String} `scene-name` Name of the scene. * @return {String} `item-name` Name of the item in the scene. @@ -1732,7 +1735,7 @@ void WSEvents::OnSceneItemVisibilityChanged(void* param, calldata_t* data) { } /** - * An item's locked status has been toggled. + * A scene item's locked status has been toggled. * * @return {String} `scene-name` Name of the scene. * @return {String} `item-name` Name of the item in the scene. @@ -1770,7 +1773,7 @@ void WSEvents::OnSceneItemLockChanged(void* param, calldata_t* data) { } /** - * An item's transform has been changed. + * A scene item's transform has been changed. * * @return {String} `scene-name` Name of the scene. * @return {String} `item-name` Name of the item in the scene. @@ -1921,7 +1924,7 @@ void WSEvents::OnStudioModeSwitched(bool checked) { } /** - * A custom broadcast message was received + * A custom broadcast message, sent by the server, requested by one of the websocket clients. * * @return {String} `realm` Identifier provided by the sender * @return {Object} `data` User-defined data diff --git a/src/WSRequestHandler_General.cpp b/src/WSRequestHandler_General.cpp index 416ac013..ea1c6a63 100644 --- a/src/WSRequestHandler_General.cpp +++ b/src/WSRequestHandler_General.cpp @@ -171,6 +171,7 @@ RpcResponse WSRequestHandler::Authenticate(const RpcRequest& request) { * @name SetHeartbeat * @category general * @since 4.3.0 + * @deprecated Since 4.9.0. Please poll the appropriate data using requests. Will be removed in v5.0.0. */ RpcResponse WSRequestHandler::SetHeartbeat(const RpcRequest& request) { if (!request.hasField("enable")) { @@ -231,7 +232,7 @@ RpcResponse WSRequestHandler::GetFilenameFormatting(const RpcRequest& request) { /** * Get OBS stats (almost the same info as provided in OBS' stats window) * - * @return {OBSStats} `stats` OBS stats + * @return {OBSStats} `stats` [OBS stats](#obsstats) * * @api requests * @name GetStats @@ -319,12 +320,12 @@ RpcResponse WSRequestHandler::GetVideoInfo(const RpcRequest& request) { /** * Open a projector window or create a projector on a monitor. Requires OBS v24.0.4 or newer. - * - * @param {String (Optional)} `type` Type of projector: Preview (default), Source, Scene, StudioProgram, or Multiview (case insensitive). + * + * @param {String (Optional)} `type` Type of projector: `Preview` (default), `Source`, `Scene`, `StudioProgram`, or `Multiview` (case insensitive). * @param {int (Optional)} `monitor` Monitor to open the projector on. If -1 or omitted, opens a window. - * @param {String (Optional)} `geometry` Size and position of the projector window (only if monitor is -1). Encoded in Base64 using Qt's geometry encoding (https://doc.qt.io/qt-5/qwidget.html#saveGeometry). Corresponds to OBS's saved projectors. + * @param {String (Optional)} `geometry` Size and position of the projector window (only if monitor is -1). Encoded in Base64 using [Qt's geometry encoding](https://doc.qt.io/qt-5/qwidget.html#saveGeometry). Corresponds to OBS's saved projectors. * @param {String (Optional)} `name` Name of the source or scene to be displayed (ignored for other projector types). - * + * * @api requests * @name OpenProjector * @category general diff --git a/src/WSRequestHandler_MediaControl.cpp b/src/WSRequestHandler_MediaControl.cpp index 1b7a73bf..225c40c5 100644 --- a/src/WSRequestHandler_MediaControl.cpp +++ b/src/WSRequestHandler_MediaControl.cpp @@ -51,7 +51,7 @@ QString getSourceMediaState(obs_source_t *source) * @api requests * @name PlayPauseMedia * @category media control -* @since 4.9.0 +* @since unreleased */ RpcResponse WSRequestHandler::PlayPauseMedia(const RpcRequest& request) { if ((!request.hasField("sourceName")) || (!request.hasField("playPause"))) { @@ -81,7 +81,7 @@ RpcResponse WSRequestHandler::PlayPauseMedia(const RpcRequest& request) { * @api requests * @name RestartMedia * @category media control -* @since 4.9.0 +* @since unreleased */ RpcResponse WSRequestHandler::RestartMedia(const RpcRequest& request) { if (!request.hasField("sourceName")) { @@ -110,7 +110,7 @@ RpcResponse WSRequestHandler::RestartMedia(const RpcRequest& request) { * @api requests * @name StopMedia * @category media control -* @since 4.9.0 +* @since unreleased */ RpcResponse WSRequestHandler::StopMedia(const RpcRequest& request) { if (!request.hasField("sourceName")) { @@ -139,7 +139,7 @@ RpcResponse WSRequestHandler::StopMedia(const RpcRequest& request) { * @api requests * @name NextMedia * @category media control -* @since 4.9.0 +* @since unreleased */ RpcResponse WSRequestHandler::NextMedia(const RpcRequest& request) { if (!request.hasField("sourceName")) { @@ -168,7 +168,7 @@ RpcResponse WSRequestHandler::NextMedia(const RpcRequest& request) { * @api requests * @name PreviousMedia * @category media control -* @since 4.9.0 +* @since unreleased */ RpcResponse WSRequestHandler::PreviousMedia(const RpcRequest& request) { if (!request.hasField("sourceName")) { @@ -200,7 +200,7 @@ RpcResponse WSRequestHandler::PreviousMedia(const RpcRequest& request) { * @api requests * @name GetMediaDuration * @category media control -* @since 4.9.0 +* @since unreleased */ RpcResponse WSRequestHandler::GetMediaDuration(const RpcRequest& request) { if (!request.hasField("sourceName")) { @@ -232,7 +232,7 @@ RpcResponse WSRequestHandler::GetMediaDuration(const RpcRequest& request) { * @api requests * @name GetMediaTime * @category media control -* @since 4.9.0 +* @since unreleased */ RpcResponse WSRequestHandler::GetMediaTime(const RpcRequest& request) { if (!request.hasField("sourceName")) { @@ -263,7 +263,7 @@ RpcResponse WSRequestHandler::GetMediaTime(const RpcRequest& request) { * @api requests * @name SetMediaTime * @category media control -* @since 4.9.0 +* @since unreleased */ RpcResponse WSRequestHandler::SetMediaTime(const RpcRequest& request) { if (!request.hasField("sourceName") || !request.hasField("timestamp")) { @@ -295,7 +295,7 @@ RpcResponse WSRequestHandler::SetMediaTime(const RpcRequest& request) { * @api requests * @name ScrubMedia * @category media control -* @since 4.9.0 +* @since unreleased */ RpcResponse WSRequestHandler::ScrubMedia(const RpcRequest& request) { if (!request.hasField("sourceName") || !request.hasField("timeOffset")) { @@ -332,7 +332,7 @@ RpcResponse WSRequestHandler::ScrubMedia(const RpcRequest& request) { * @api requests * @name GetMediaState * @category media control -* @since 4.9.0 +* @since unreleased */ RpcResponse WSRequestHandler::GetMediaState(const RpcRequest& request) { if (!request.hasField("sourceName")) { @@ -366,7 +366,7 @@ RpcResponse WSRequestHandler::GetMediaState(const RpcRequest& request) { * @api requests * @name GetMediaSourcesList * @category sources -* @since 4.9.0 +* @since unreleased */ RpcResponse WSRequestHandler::GetMediaSourcesList(const RpcRequest& request) { diff --git a/src/WSRequestHandler_Outputs.cpp b/src/WSRequestHandler_Outputs.cpp index dad0bf19..ab8b0cc1 100644 --- a/src/WSRequestHandler_Outputs.cpp +++ b/src/WSRequestHandler_Outputs.cpp @@ -71,7 +71,7 @@ RpcResponse findOutputOrFail(const RpcRequest& request, std::function} `profiles` List of available profiles. + * @return {String} `profiles.*.profile-name` Filter name * * @api requests * @name ListProfiles diff --git a/src/WSRequestHandler_Recording.cpp b/src/WSRequestHandler_Recording.cpp index d58f60c7..24aba87a 100644 --- a/src/WSRequestHandler_Recording.cpp +++ b/src/WSRequestHandler_Recording.cpp @@ -43,7 +43,7 @@ RpcResponse WSRequestHandler::GetRecordingStatus(const RpcRequest& request) { } /** - * Toggle recording on or off. + * Toggle recording on or off (depending on the current recording state). * * @api requests * @name StartStopRecording diff --git a/src/WSRequestHandler_ReplayBuffer.cpp b/src/WSRequestHandler_ReplayBuffer.cpp index be860584..d4c83a27 100644 --- a/src/WSRequestHandler_ReplayBuffer.cpp +++ b/src/WSRequestHandler_ReplayBuffer.cpp @@ -23,7 +23,7 @@ RpcResponse WSRequestHandler::GetReplayBufferStatus(const RpcRequest& request) { } /** -* Toggle the Replay Buffer on/off. +* Toggle the Replay Buffer on/off (depending on the current state of the replay buffer). * * @api requests * @name StartStopReplayBuffer diff --git a/src/WSRequestHandler_SceneCollections.cpp b/src/WSRequestHandler_SceneCollections.cpp index 1f87996b..0359144e 100644 --- a/src/WSRequestHandler_SceneCollections.cpp +++ b/src/WSRequestHandler_SceneCollections.cpp @@ -22,7 +22,7 @@ RpcResponse WSRequestHandler::SetCurrentSceneCollection(const RpcRequest& reques return request.failed("invalid request parameters"); } - // TODO : Check if specified profile exists and if changing is allowed + // TODO : Check if specified collection exists and if changing is allowed obs_frontend_set_current_scene_collection(sceneCollection.toUtf8()); return request.success(); } @@ -51,6 +51,7 @@ RpcResponse WSRequestHandler::GetCurrentSceneCollection(const RpcRequest& reques * List available scene collections * * @return {Array} `scene-collections` Scene collections list + * @return {String} `scene-collections.*.sc-name` Scene collection name * * @api requests * @name ListSceneCollections diff --git a/src/WSRequestHandler_SceneItems.cpp b/src/WSRequestHandler_SceneItems.cpp index 96ed3f6a..10ca8212 100644 --- a/src/WSRequestHandler_SceneItems.cpp +++ b/src/WSRequestHandler_SceneItems.cpp @@ -408,7 +408,6 @@ RpcResponse WSRequestHandler::ResetSceneItem(const RpcRequest& request) { * @name SetSceneItemRender * @category scene items * @since 0.3 -* @deprecated Since 4.3.0. Prefer the use of SetSceneItemProperties. */ RpcResponse WSRequestHandler::SetSceneItemRender(const RpcRequest& request) { if (!request.hasField("source") || diff --git a/src/WSRequestHandler_Scenes.cpp b/src/WSRequestHandler_Scenes.cpp index a6d9d293..18783119 100644 --- a/src/WSRequestHandler_Scenes.cpp +++ b/src/WSRequestHandler_Scenes.cpp @@ -36,7 +36,7 @@ RpcResponse WSRequestHandler::SetCurrentScene(const RpcRequest& request) { /** * Get the current scene's name and source items. - * + * * @return {String} `name` Name of the currently active scene. * @return {Array} `sources` Ordered list of the current scene's source items. * @@ -58,7 +58,7 @@ RpcResponse WSRequestHandler::GetCurrentScene(const RpcRequest& request) { /** * Get a list of scenes in the currently active profile. - * + * * @return {String} `current-scene` Name of the currently active scene. * @return {Array} `scenes` Ordered list of the current profile's scenes (See [GetCurrentScene](#getcurrentscene) for more information). * @@ -109,8 +109,8 @@ RpcResponse WSRequestHandler::CreateScene(const RpcRequest& request) { * * @param {String (optional)} `scene` Name of the scene to reorder (defaults to current). * @param {Array} `items` Ordered list of objects with name and/or id specified. Id preferred due to uniqueness per scene -* @param {int (optional)} `items[].id` Id of a specific scene item. Unique on a scene by scene basis. -* @param {String (optional)} `items[].name` Name of a scene item. Sufficiently unique if no scene items share sources within the scene. +* @param {int (optional)} `items.*.id` Id of a specific scene item. Unique on a scene by scene basis. +* @param {String (optional)} `items.*.name` Name of a scene item. Sufficiently unique if no scene items share sources within the scene. * * @api requests * @name ReorderSceneItems @@ -184,7 +184,7 @@ RpcResponse WSRequestHandler::ReorderSceneItems(const RpcRequest& request) { * @api requests * @name SetSceneTransitionOverride * @category scenes - * @since 4.9.0 + * @since unreleased */ RpcResponse WSRequestHandler::SetSceneTransitionOverride(const RpcRequest& request) { if (!request.hasField("sceneName") || !request.hasField("transitionName")) { @@ -196,12 +196,12 @@ RpcResponse WSRequestHandler::SetSceneTransitionOverride(const RpcRequest& reque if (!source) { return request.failed("requested scene does not exist"); } - + enum obs_source_type sourceType = obs_source_get_type(source); if (sourceType != OBS_SOURCE_TYPE_SCENE) { return request.failed("requested scene is invalid"); } - + QString transitionName = obs_data_get_string(request.parameters(), "transitionName"); if (!Utils::GetTransitionFromName(transitionName)) { return request.failed("requested transition does not exist"); @@ -218,7 +218,7 @@ RpcResponse WSRequestHandler::SetSceneTransitionOverride(const RpcRequest& reque obs_frontend_get_transition_duration() ); } - + return request.success(); } @@ -230,7 +230,7 @@ RpcResponse WSRequestHandler::SetSceneTransitionOverride(const RpcRequest& reque * @api requests * @name RemoveSceneTransitionOverride * @category scenes - * @since 4.9.0 + * @since unreleased */ RpcResponse WSRequestHandler::RemoveSceneTransitionOverride(const RpcRequest& request) { if (!request.hasField("sceneName")) { @@ -242,7 +242,7 @@ RpcResponse WSRequestHandler::RemoveSceneTransitionOverride(const RpcRequest& re if (!source) { return request.failed("requested scene does not exist"); } - + enum obs_source_type sourceType = obs_source_get_type(source); if (sourceType != OBS_SOURCE_TYPE_SCENE) { return request.failed("requested scene is invalid"); @@ -266,7 +266,7 @@ RpcResponse WSRequestHandler::RemoveSceneTransitionOverride(const RpcRequest& re * @api requests * @name GetSceneTransitionOverride * @category scenes - * @since 4.9.0 + * @since unreleased */ RpcResponse WSRequestHandler::GetSceneTransitionOverride(const RpcRequest& request) { if (!request.hasField("sceneName")) { @@ -278,7 +278,7 @@ RpcResponse WSRequestHandler::GetSceneTransitionOverride(const RpcRequest& reque if (!source) { return request.failed("requested scene does not exist"); } - + enum obs_source_type sourceType = obs_source_get_type(source); if (sourceType != OBS_SOURCE_TYPE_SCENE) { return request.failed("requested scene is invalid"); diff --git a/src/WSRequestHandler_Sources.cpp b/src/WSRequestHandler_Sources.cpp index 6287783f..036b41c1 100644 --- a/src/WSRequestHandler_Sources.cpp +++ b/src/WSRequestHandler_Sources.cpp @@ -23,7 +23,7 @@ bool isTextFreeType2Source(const QString& sourceKind) * * @return {Array} `sources` Array of sources * @return {String} `sources.*.name` Unique source name -* @return {String} `sources.*.typeId` Non-unique source internal type (a.k.a type id) +* @return {String} `sources.*.typeId` Non-unique source internal type (a.k.a kind) * @return {String} `sources.*.type` Source type. Value is one of the following: "input", "filter", "transition", "scene" or "unknown" * * @api requests @@ -382,7 +382,7 @@ RpcResponse WSRequestHandler::GetAudioActive(const RpcRequest& request) /** * Sets (aka rename) the name of a source. Also works with scenes since scenes are technically sources in OBS. * -* Note: If the new name already exists as a source, OBS will automatically modify the name to not interfere. +* Note: If the new name already exists as a source, obs-websocket will return an error. * * @param {String} `sourceName` Source name. * @param {String} `newName` New source name. @@ -415,7 +415,7 @@ RpcResponse WSRequestHandler::SetSourceName(const RpcRequest& request) return request.success(); } else { - return request.failed("a source with that newSourceName already exists"); + return request.failed("a source with that name already exists"); } } @@ -596,8 +596,8 @@ RpcResponse WSRequestHandler::SetSourceSettings(const RpcRequest& request) * * @return {String} `source` Source name. * @return {String} `align` Text Alignment ("left", "center", "right"). - * @return {int} `bk-color` Background color. - * @return {int} `bk-opacity` Background opacity (0-100). + * @return {int} `bk_color` Background color. + * @return {int} `bk_opacity` Background opacity (0-100). * @return {boolean} `chatlog` Chat log. * @return {int} `chatlog_lines` Chat log lines. * @return {int} `color` Text color. @@ -656,8 +656,8 @@ RpcResponse WSRequestHandler::GetTextGDIPlusProperties(const RpcRequest& request * * @param {String} `source` Name of the source. * @param {String (optional)} `align` Text Alignment ("left", "center", "right"). - * @param {int (optional)} `bk-color` Background color. - * @param {int (optional)} `bk-opacity` Background opacity (0-100). + * @param {int (optional)} `bk_color` Background color. + * @param {int (optional)} `bk_opacity` Background opacity (0-100). * @param {boolean (optional)} `chatlog` Chat log. * @param {int (optional)} `chatlog_lines` Chat log lines. * @param {int (optional)} `color` Text color. @@ -1013,7 +1013,7 @@ RpcResponse WSRequestHandler::SetTextFreetype2Properties(const RpcRequest& reque * @name GetBrowserSourceProperties * @category sources * @since 4.1.0 - * @deprecated Since 4.8.0. Prefer the use of GetSourceSettings. + * @deprecated Since 4.8.0. Prefer the use of GetSourceSettings. Will be removed in v5.0.0 */ RpcResponse WSRequestHandler::GetBrowserSourceProperties(const RpcRequest& request) { @@ -1055,7 +1055,7 @@ RpcResponse WSRequestHandler::GetBrowserSourceProperties(const RpcRequest& reque * @api requests * @name SetBrowserSourceProperties * @category sources - * @deprecated Since 4.8.0. Prefer the use of SetSourceSettings. + * @deprecated Since 4.8.0. Prefer the use of SetSourceSettings. Will be removed in v5.0.0 * @since 4.1.0 */ RpcResponse WSRequestHandler::SetBrowserSourceProperties(const RpcRequest& request) diff --git a/src/WSRequestHandler_Streaming.cpp b/src/WSRequestHandler_Streaming.cpp index c8f5732e..aa0782c9 100644 --- a/src/WSRequestHandler_Streaming.cpp +++ b/src/WSRequestHandler_Streaming.cpp @@ -43,7 +43,7 @@ RpcResponse WSRequestHandler::GetStreamingStatus(const RpcRequest& request) { } /** - * Toggle streaming on or off. + * Toggle streaming on or off (depending on the current stream state). * * @api requests * @name StartStopStreaming @@ -292,7 +292,6 @@ RpcResponse WSRequestHandler::SaveStreamSettings(const RpcRequest& request) { /** * Send the provided text as embedded CEA-608 caption data. - * As of OBS Studio 23.1, captions are not yet available on Linux. * * @param {String} `text` Captions text * diff --git a/src/WSRequestHandler_StudioMode.cpp b/src/WSRequestHandler_StudioMode.cpp index badae29d..6781f0ad 100644 --- a/src/WSRequestHandler_StudioMode.cpp +++ b/src/WSRequestHandler_StudioMode.cpp @@ -166,7 +166,7 @@ RpcResponse WSRequestHandler::DisableStudioMode(const RpcRequest& request) { } /** - * Toggles Studio Mode. + * Toggles Studio Mode (depending on the current state of studio mode). * * @api requests * @name ToggleStudioMode