obsproject / obs-browser

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

Some Events (addEventListener) are not functioning in OBS30+ #428

Closed BarryCarlyon closed 10 months ago

BarryCarlyon commented 10 months ago

Operating System Info

Windows 10

Other OS

No response

OBS Studio Version

30.0.0

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/OHn6774kHAQOU11w

OBS Studio Crash Log URL

No response

Expected Behavior

Events work

Current Behavior

Most Events bound to addEventListener (on window) do not function/get called

The following still work/I've tested to still work:

(Tested most of the other events and nothing else seems to work, most notabled stream/recording starting/started/stopping/stopped which are the key events I utilise)

Steps to Reproduce

In a browser source use following example javascript code results in no console.log occuring indicating the event wasn't called.


    window.addEventListener('obsStreamingStarting', function() {
        console.log('OBS: obsStreamingStarting');
    });
    window.addEventListener('obsStreamingStarted', function() {
        console.log('OBS: obsStreamingStarted');
    });
    window.addEventListener('obsStreamingStopping', function() {
        console.log('OBS: obsStreamingStopping');
    });
    window.addEventListener('obsStreamingStopped', function() {
        console.log('OBS: obsStreamingStopped');
    });
    window.addEventListener('obsRecordingStarting', function() { console.log('OBS: obsRecordingStarting'); });
    window.addEventListener('obsRecordingStarted', function() { console.log('OBS: obsRecordingStarted'); });
    window.addEventListener('obsRecordingStopping', function() { console.log('OBS: obsRecordingStopping'); });
    window.addEventListener('obsRecordingStopped', function() { console.log('OBS: obsRecordingStopped'); });

Anything else we should know?

I tested this on

Control Level 2: Read Access to user information

and

Control Level 5: EVERYTHING (full access to OBS)

Under Control Level 5 the call to start/stop recording works via JavaScript so it seems that it is just the events side.

And/or using the UI buttons to start/stop recording/of streaming under control level 5 no console.log's occur/event emissions

I did not test every function jsut the listed "broken" ones above and obsSceneChanged

steveseguin commented 10 months ago

I just started noticing this issue within my own app; recently updated to OBS v30.

Scene changes are detected, but not the streaming state; tested with Twitch RTMP or WHIP outputs.

martinwaldau commented 10 months ago

I can also confirm, I got the same issue as @BarryCarlyon.

If a log From Windows 11 is needed: https://obsproject.com/logs/Zm8XXkh7gUs4XBmy