Skip to content

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

@Grummfy

Description

@Grummfy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions