• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.
Status
Not open for further replies.
Hello,

I'm working on a phone soundboard application for sinusbot and I want to find a way to stop SFX sound, without stopping the main music. With Sinusbot REST API or Sinusbot Scripting API, it's not really important.
Is this possible ?

Kind regards,

Matthéo PERELLE.
 

flyth

is reticulating splines
Staff member
Developer
Contributor
You can try the following in a script with version 0.10+:
Code:
var media = require('media');
media.playURL('track://trackuuid?ephemeral=true&alias=arandomaliasofyourchoice');

and then stop via:
Code:
media.stop('arandomaliasofyourchoice');

Replace trackuuid with the UUID of the track (should be visible in the tag editor).
Replace arandomaliasofyourchoice with something unique.
 
Thats don't work very good for me :/

Sinusbot version: 0.10.8-71ba94b
OS: Linux Debian

Code:
var media = require('media');
media.playURL('track://trackuuid?ephemeral=true&alias=arandomaliasofyourchoice');
Ok, this is working and start the music
Code:
media.stop('arandomaliasofyourchoice');
Replace trackuuid with the UUID of the track (should be visible in the tag editor).
Replace arandomaliasofyourchoice with something unique.
But this don't stop the music, however in log i can see he is trying to stop it :/


Code:
2017-12-06T13:32:26+01:00 Deleting channel 1090f893-dc4c-47c2-999c-b34cd712c1b5 (3d84f9d6-b5c8-4fc9-b3c3-3ea4a04a7cb3) ID 062a37a7-e3cc-48ec-a0ef-c34928a3a5f6 (cc 0)
2017-12-06T13:32:26+01:00 Removing closed channel 1090f893-dc4c-47c2-999c-b34cd712c1b5 (3d84f9d6-b5c8-4fc9-b3c3-3ea4a04a7cb3) ID 062a37a7-e3cc-48ec-a0ef-c34928a3a5f6
2017-12-06T13:32:25+01:00 Storing configuration.
2017-12-06T13:32:09+01:00 Stopping 3d84f9d6-b5c8-4fc9-b3c3-3ea4a04a7cb3
2017-12-06T13:32:03+01:00 New channel 1090f893-dc4c-47c2-999c-b34cd712c1b5 (3d84f9d6-b5c8-4fc9-b3c3-3ea4a04a7cb3) ID 062a37a7-e3cc-48ec-a0ef-c34928a3a5f6 (cc 0)
2017-12-06T13:31:56+01:00 TS/ERR 2564 e'access to default group is forbidden' x'' r'PR:{2055b3bc-0f3a-4291-bd90-afb24182651c}:40/GCLL'

Code:
var media = require('media');
var event = require('event');
event.on('api:test_startsfx', function(ev){
    media.playURL('track://1090f893-dc4c-47c2-999c-b34cd712c1b5?ephemeral=true&alias=3d84f9d6-b5c8-4fc9-b3c3-3ea4a04a7cb3')
});
event.on('api:test_stopsfx', function(ev){
    media.stop('3d84f9d6-b5c8-4fc9-b3c3-3ea4a04a7cb3');
});

I think I missed something but I do not know what. All suggestions are welcome
Thank you for your help
 

flyth

is reticulating splines
Staff member
Developer
Contributor
Just checked - it's not hitting that alias correctly, will be fixed in the next version, which is likely to be released today or tomorrow.
 
Status
Not open for further replies.
Top