Custom audio control

Nov 06, 2020

I was wondering if anyone has an idea/solution.  With Storyline 2 we were able to control the volume (without using the built in audio slider) by setting the Audio.setMasterVolume in javascript.  I see that isn't available anymore in 360.  Has anyone been able to control the volume using 360?

2 Replies
Matthew Bartoli

I finally found a solution to accessing the volume.  Search the ds-slides.min.js file for parseBlocks,i=DS,r=i._,s=i.utils (this file is minified, so make sure no spaces in the search term.  Then look just before for var e= and insert _c=DS.appState; before the var keyword.  So for example you will see this (the numbers in parenthesis may vary) var e=f(50),n=f(16).parseBlocks,i=DS,r=i._,s=i.utils and you will change it to _c=DS.appState;var e=f(50),n=f(16).parseBlocks,i=DS,r=i._,s=i.utils  

You can then adjust the volume from within Storyline using a javascript trigger and calling _c.setVolume(number from 0 to 1).

Emily Williams

Thanks for posting this, Matthew! I'm currently trying to build in a volume control slider and wasn't having any luck with the instructions floating around in past posts for Storyline 2. Any chance you have an example file you could share using this solution? I'm not very good with JS yet so examples are a huge help!