Sinusbot-Stream, a web-based player to stream audio from SinusBot bot instances.
- Stream music from your SinusBot bots in your browser
- Webpage using Bootstrap and VideoJS
- Displays album art from cached file or from youtube based on metadata or a custom default image
- Displays song name with link to video (if found in metadata) or link to google search
- Button to reload player and menu to change instance without reloading page
- Player automatically reloads when source fails or player throws an error
- Support to switch between multiple bot instances via a dropdown or URL
- Last used bot instance and volume stored in cookies
- Links to join Teamspeak server and login to SinusBot's webpanel on the navigation bar
- Live demo found here
- Some browsers do not support the livestream provided by the SinusBot API.
- The following browsers should work:
- Chrome
- Firefox
- Opera
- The following browsers have been confirmed as being incompatible:
- Edge and IE on Windows
- Safari on OSX
- Safari/Chrome on iOS
- The following browsers should work:
- Logging
- Skip track button
- Sinusbot
- apache2, libapache2-mod-php, php, php-curl
- Video.js
- Bootstrap
- Install all dependencies.
- Restart apache2
- Edit sinusbot's config.ini
EnableWebStream = trueSampleInterval = 60
- Clone this repository
git clone https://github.com/Zahzi/SinusBot-Stream.gitand move the stream files into your web directory. You can also upload the files manually) - Edit config.php with your server information and preferences
Note that this was written for Ubuntu 16.04, however, you should be able to adapt it without too much difficulty.
-
Install dependencies:
apt-get update -y && apt-get install apache2 php php-curl libapache2-mod-php git -y -
Restart apache2:
service apache2 restart -
A) Method a: Clone this repository to your home directory and move the necesary files
-
cd ~ && git clone https://github.com/Zahzi/SinusBot-Stream.gitMove the SinusBot-Stream files to your webdirectory (default for apache2 is usually/var/www/html) -
mv ~/SinusBot-Stream/SinusBot-Stream/ /var/www/html
B) Method b: Clone this repository to a direcotry and create a symlink. This will make it easier to pull updates. (Note that FollowSymLinks must be set in your apache site settings).
-
cd /var/www/ && git clone https://github.com/Zahzi/SinusBot-Stream.git -
cd /var/www/html && ln -s /var/www/SinusBot-Stream/SinusBot-Stream/
-
-
Edit the SinusBot config. Default path is
/opt/sinusbot/config.ini-
nano /opt/sinusbot/config.ini -
Set
EnableWebStream = trueandSampleInterval = 60 -
Save the file.
-
-
Edit SinusBot-Stream's config.php:
-
nano /var/www/html/SinusBot-Stream/config.php -
Make sure the follow settings are set:
-
Set
$ipto the ip of the server that SinusBot is running on. This is the same ip you use to access the admin panel. (can be a DNS name). -
Set
$portto be the port the SinusBot is set to run on. -
Set
$enableSSL = trueif SinusBot is set to run on https -
Set
$userto be the username for the stream to login to in SinusBot. This user needs login permission. It's recommended not to give it anything else. -
Set
$passwordto be the corresponding password to the user. -
Set
$instanceIDSto be an array containing all instances that you wish to use in quotes separated by commas. Eg:$instanceIDS = array("10d82776-f87c-41ee-be62-bb17738538c3", "09a54439-g77a-41dd-fd25-bc14422548d3");Get the instance IDs from "Instance Settings": -
Set
$instanceNamesto be an array of names you wish to display corresponding to the instances. You must have the same number of names as instances in quotes separated by commas. Example:$instanceNames = array("MusicBot #1", "MusicBot #2");
-
-
Save the file.
-
-
Access the stream at http(s)://yourip/SinusBot-Stream/. If you wish to configure the stream to run on a different port, update the apache settings.
- Uses the SinusBot PHP API Class from marburger93
- Navigation bar icons from icomoon.io
- Originally based on crank015's SinusBot-Stream

