The first command is connecting it to the OBS Websocket.
The OBS Websocket JavaScript API uses something called “promises” where you put together a chain of commands. The next is all one very large statement. () įirst, the script creates an OBSWebSocket object. Below this there are a few examples, which I will post here, too. In the file itself I comment on which variables you can use, and where to find the commands that the OBS Websocket API understands. $("#currentslide").attr("data-plugin", OpenLP.currentPlugin) But the most important is, of course, the function “obsRemote”. only showing the element, when the right kind of slide is selected. Text = text.replace(/\n/g, " / ") The next line I need for the CSS to work correctly, i.e. If you prefer new lines, just change " / " back to "". }For cosmetic reasons I told the script to use forward slashes instead of new lines. Then I inserted some lines to capture information I think might be useful if you wanted to control OBS.
HOW TO TRACK ALERTS IF USING OBS STUDIO HOW TO
Nevertheless, I will now go briefly through all the changes I made, and at the end explain how to customize the script. I tried to comment everything important inside of the files themselves. How to customize the script (also: an explanation of how it all works)The custom stage view that we have installed is based on the default stage view provided with OpenLP. A solution would be to have one custom stage view with the OBS JavaScript in one scene (and running in the background all the time), and have a second custom stage view without the OBS JavaScript in all the other scenes. If all of them use the same browser item, and all are active all the time, you will end up with multiple action triggers everytime you switch slides in OpenLP. There could be problems if you have multiple scenes with lyrics inside of them. Note: As I said, the JavaScript is running inside of the browser item. I figured it’s probably good to have the browser refresh itself every now and then.
Our JavaScript is running inside this browser item, so if we deactivate it, the script is deactivated, too. Deactivate when source is invisible: Now this is important! You will want to have the browser item active, even when it is not visible, and even when you’re in another scene that does not display lyrics.User defined CSS: Delete everything here, we’re taking care of that ourselves.
HOW TO TRACK ALERTS IF USING OBS STUDIO UPDATE
FPS: I choose 5, because the Javascript updates every 500ms, so I think I don’t need to update the browser item all too often.Width/Height: Just put in the dimensions you’re streaming in.