obsproject / obs-browser

CEF-based OBS Studio browser plugin
GNU General Public License v2.0
771 stars 218 forks source link

JS Bindings in Browser Dock Not work #376

Closed shugen002 closed 1 year ago

shugen002 commented 1 year ago

Operating System Info

Windows 11

Other OS

No response

OBS Studio Version

28.0.0-rc1

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/IWEEP9Z1X4ansTXc

OBS Studio Crash Log URL

No response

Expected Behavior

Just like in a normal Browser Source

Current Behavior

The Callback looks like didn't called and return nothing. And the event listener didn't trigger.

Steps to Reproduce

  1. Open OBS with arguments: --remote-debugging-port=9229 to debug browser
  2. Setup a Browser Dock
  3. enter the example code in readme.md

Anything else we should know?

No response

Fenrirthviti commented 1 year ago

This sounds more likely to be a support request rather than a bug report, and we are not currently accepting support requests on GitHub Issues. Please use our forums or Discord for assistance.

Thank you!

tt2468 commented 1 year ago

To answer the question though, the bindings are only available in browser sources, not panels.

devmount commented 3 months ago

@tt2468 Is there any way, to listen to events (e.g. obsRecordingStarted) from a panel containing a browser source?

tt2468 commented 3 months ago

@tt2468 Is there any way, to listen to events (e.g. obsRecordingStarted) from a panel containing a browser source?

Browser panels cannot "contain" OBS sources, and are not related to sources in any way, so no.

devmount commented 3 months ago

Wow thanks for answering instantly! And sorry, I might have used the wrong wording here. I meant "Custom Browser Docks".

image

I found that event listeners work when adding the browser source to the sources list, but do not work if I add them as custom browser dock...

tt2468 commented 3 months ago

Browser docks are browser docks. All browser docks do not have access to the custom OBS window objects.

devmount commented 3 months ago

Ok, thanks for the clarification!