obsproject / obsproject/obs-browser

obs websocket vendor event, cant get the detail of an event if it's an array

Open
#378 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
904
Forks
267
Avg merge
1d 23h
Merged PRs (30d)
2

Description

Operating System Info

Ubuntu 22.04

Other OS

No response

OBS Studio Version

Other

OBS Studio Version (Other)

27.2.4

OBS Studio Log URL

https://gist.github.com/Grummfy/847649e31535add040f7d84b24d7b96a

OBS Studio Crash Log URL

No response

Expected Behavior

receiving event.detail with the data send.

Current Behavior

if the data is an array, the event.detail is not correctly setted.

Steps to Reproduce

From a client send a vendor request in obs to the vendor (with CallVendorRequest to vendorName obs-browser) with data as array or object (in js type) and you have the reproduction.

In the log, we can see the message I have send.

In one the event_data is

 {
  "Henry": {
    "is_chat": true,
    "point": 4,
    "pseudo": "Henry"
  },
  "Wally": {
    "is_chat": false,
    "point": 0,
    "pseudo": "Wally"
  }
}

this succeed with event.detail containing the information.

[
  {
    "is_chat": true,
    "point": 4,
    "pseudo": "Henry"
  },
  {
    "is_chat": false,
    "point": 0,
    "pseudo": "Wally"
  }
]

this fail with event.detail empty.

Anything else we should know?

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files or tests. Start by reproducing an obs-browser CallVendorRequest with object and array data on OBS 27.2.4, then trace how the vendor event populates event.detail. Done means array payloads preserve their data in event.detail as object payloads do.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, javascript
Domain
api, desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.