obs-websocket-community-projects / obs-websocket-js

Consumes https://github.com/obsproject/obs-websocket
MIT License
679 stars 96 forks source link

RefreshBrowserSource gone? #304

Closed rodrigograca31 closed 2 years ago

rodrigograca31 commented 2 years ago

Description:

previously (4.9.....) I had obs.send("RefreshBrowserSource", { sourceName: "streamelements" }); to reload my browsers when they bugged sometimes...

5.x doesnt seem to have that event.... How do we go about it? Toggeling its visibility seems to work... but as I explained in #303 it requires lots of code... we go from 1 line to 20 lines of code:

obs.call("GetSceneItemId", {
    sceneName: "browsers",
    sourceName: "streamelements",
})
.then((data) => {
    console.log(data.sceneItemId);
    obs.call("SetSceneItemEnabled", {
        sceneName: "browsers",
        sceneItemId: data.sceneItemId,
        sceneItemEnabled: false,
    })
    .then(() => {
        obs.call("SetSceneItemEnabled", {
            sceneName: "browsers",
            sceneItemId: data.sceneItemId,
            sceneItemEnabled: true,
        });
    });
});

This feature was basically access to that last button Refresh cache of current page image

Versions Used (if applicable):

t2t2 commented 2 years ago

https://github.com/obsproject/obs-websocket/issues/972