[Feature Request] UDP API
Hey, It would be nice to have an UDP API. This Plugin (older Version) "https://frie.se/ts3sb/" had one but removed it see the FAQ (https://frie.se/ts3sb/#FAQ) .
I've got a very basic API at least somewhat working. It literally just interprets the received UDP packet as path to a local file and plays that if it exists. I'm going to test it for a bit and then see if I'm going to add commands like play (file), stop, pause, resume, playpause, volume, etc. Once I feel like it's stable enough - and judging by my almost non-existent C++ skills that's going to take a bit - I might create a Pull Request.
I have forked this repo and started working on the API. So far I've added an entry to the settings dialog or drop-down menu, allowing the user to enable the UDP API (It is disabled by default for security reasons) and to block all connections not coming from your current computer. (This is enabled by default, also for security reasons, but it's just a simple check against the packet's origin IP-Address. I don't know if there's a safer way to block packets from another client.)
The UDP Server is listening on the port 35810, but this is also displayed in the settings menu.
As I've already mentioned above, my C++ skills are very limited and since it's C++ it's not necessarily flawless if it compiles, so beware of possible memory leaks or other programming errors. I haven't thoroughly tested it, as I've just today compiled it, but if you wish to take part in testing, head to DeltaTimo/RP-Soundboard, compile the forked version and try it! 😉
The following commands are available: play <path to soundfile on computer of soundboard>: Attempts to play the file at the filepath on the plugin's computer. stop: Stops a playing sound. pause: Pauses a playing sound. unpause: Resumes a paused sound. playpause: (Un)pauses a playing or paused sound. button <button name or ID>: Plays the sound specified for a button. This is currently not working!