|
||||||||||||||||||
|
||||||||||||||||||
About the Pretzel Now Playing API :Welcome to the API page ! This API is for people who want to have a dynamic "Now Playing" overlay for the music on their streams, but only use Pretzel's browser player and not the Pretzel App. The App can produce files that can easily be integrated into OBS (or other streaming software), but the web browser version cannot. This is where this API comes in. It is designed to work in conjunction with the Streamelements or Nightbot Chatbots, but could easily be used with many other chatbots with a little bit of tweaking on your chat command setup. It DOES require the Pretzel "Now Playing" messages to be appearing in your stream chat for it to work. It will not work otherwise, but is still useful for streamers with a busy chat.
Setting Up Your Secret Code :First of all, you will need what I call your "Secret Code". This is a string of between 16 and 32 characters (no spaces) that is only known by you. Think of it as being like a password. If someone else were to know your secret code, it might be possible for them to put any message they liked onto your screen. Obviously not a good thing so keep this very private. The code must be made up from the characters a-z, A-Z and 0-9. No other characters are permitted. Some example valid codes might be: ireallylikebakedbeans
But try to keep it to something that is unique and nobody will guess. For your convenience, here is a suggested code. A different code will be displayed on this page each time you refresh the page. Feel free to copy and paste this code. You can also change your code at any time you like, but remember that the code is needed on BOTH the StreamElements or Nightbot command and in the OBS overlay URL, and both MUST be identical. I also recommend that you DO NOT use a password that you use elsewhere because the secret code is not stored in encrypted form on either the bot's website or on your OBS.
Next, you will need to setup the bot command for either StreamElements or Nightbot.
The basic code you will need is:
but make sure you insert YOUR OWN CODE where it says "YOURSECRETCODEHERE". You then set up the command as shown in the screenshots below: and you ALSO need to set up the ADVANCED SETTINGS for the command. Note the COMMAND KEYWORDS has an entry of "prtzl.io" as follows:
This is the basic command just to get you going. There are formatting options that you can adjust. I will cover them below on this page but let's get this working first !
The basic code you will need is:
but make sure you insert YOUR OWN CODE where it says "YOURSECRETCODEHERE". You then set up the command as shown in the screenshot below: PLEASE NOTE: The command for Nightbot is "now" and NOT "!now". The command will NOT work if you put an exclamation mark in the command name. This is the basic command just to get you going. There are formatting options that you can adjust. I will cover them below on this page but let's get this working first !
Setup the Overlay : The next step is to get your overlay displaying on your scenes on OBS. You do this by adding a BROWSER SOURCE and setting the URL to:
Replace YOURCHANNELNAMEHERE with your own channel name but make sure you type it all in lower case, and replace YOURSECRETCODEHERE with your own secret code.
Next, please TICK the following settings on the OBS Browser Source (or equivalents if using different software): "Shutdown source when not visible" and " Refresh browser when source becomes active" You should now be ready to roll 😊
Custom Settings :There are a number of custom settings you can choose from to format the overlay: FONT : To change the font, edit the command and change the &font=couriet part replacing courier. Valid options are "courier", "times", "brush" and "arial".
WEIGHT : To change the weight, edit the command and change the &weight=bold part replacing bold. Valid options are "normal" and "bold".
STYLE : To change the style, edit the command and change the &style=normal part replacing normal. Valid options are "normal" and "italic".
SIZE : To change the font size, edit the command and change the &size=16 part replacing 16. Valid options are any number. Font sizes below 10 are probably too small to be read properly. Sizes above 32 are going to be pretty blooming HUGE !!
COLOUR : The font colour is a 6 digit HEX number which defines the RGB values. To change the font colour, edit the command and change the &colour=FFFFFF part replacing FFFFFF. You can choose a colour from the options below, or visit https://www.rapidtables.com/web/color/RGB_Color.html for all possible options.
And that's about it really ! You should be good to go. If you have any problems, feel free to message me on Twitch (zoeballz) or you can message me on the Pretzel Discord. Have fun 😊
|