The code removed in this commit was not removed in the process of
migrating to the new HTTP-server-less code. It causes additional errors
and is generally useless now.
Since introducing WebChimera.js the bot is no longer shutting down by itself after all services are shut down since the instances that WebChimera.js generates would still be alive after deletion. There is no way to get around this except if WebChimera.js reveals an explicit release function which it doesn't. The only release function gets called before the VM gets killed.
Use LibVLC via WebChimera.js instead of VLC through its HTTP API.
This closes#17 and fixes#10, finishes two tasks of #2 and actually solves a few additional issues like:
- Not being able to resume playback from a stopped playlist.
- Unclear and buggy definition of volume range.
- Bot just showing "playing next playlist entry" instead of actually showing the title of the next playlist entry.
- Missing "previous" command to go to previous playlist entry.
- Missing "loop" command to loop the playlist. (Now exists in form of "loop on"/"loop off")
- Missing "stop-after" command to stop playback after current track ends.
- A small bug in ts3query.iced that didn't escape line breaks. (Was in use here for "playlist"/"list" commands which got removed in the process.)
Known issues:
- Starting with an empty playlist, adding an entry and then typing "next" will automatically play the first entry. This is not really a bug or even an issue but definitely unexpected behavior that is coming from VLC.
onEndReached does not just trigger the callback at the end of the playlist but actually at the end of each track. This should have been better documented.
Got the documentation wrong here, I was looking up examples and it looked as if calling the on* fields as functions was the right way to go but it was actually not. 64bf4ffc36/src/JsVlcPlayer.cpp (L90-L102) clearly defines as set-properties here.
- Hopefully fixes audio volume not being set to 50% at startup.
- Volume now is in the range of 0 to 200 (percentage, so goes from 0% to 200% for those numbers).
- Made message displaying volume change display the actual level set.
- We're no longer providing an HTTP interface.
- Now stores metadata info in a separate variable for later retrieval by input MRL.
- Now prints when player reaches end of playlist.
- Now supports toggle-pausing using "pause" command.
- Should fix playlist not being able to kick off on "play" if stopped.
- Removed vlc-api dependency.
Relates to issues #17, #10 and #7 (partially).