Forum Discussion
Javascript to MUTE audio?
Is it possible to MUTE audio in Storyline? I'm working on a course with a ground-up custom interface with a button that's supposed to mute/unmute - not pause/play or stop/play - the audio.
Are there any Javascript gurus out there who know if this is possible? And if so, can you provide the scripts for mute and unmute? That would SO make my day.
Dazed and confused...
Patrice
141 Replies
- PeterForbesCommunity Member
Great tip guys...thanks so much

Hi Peter,
I am glad that this thread helped you out, and I just wanted to welcome you to E-Learning Heroes! If you need any other help, please let us know!
- PaulWijnenCommunity Member
I created a SWF loader. In there you can make your own volume controls to adjust the volume of the loaded swf.
Hi Paul,
If you're able to share that here it may be helpful to other users! If not, you may want to provide directions on how you set this up so that they could try and replicate.
- JohnDoe12Community Member
julie wynn said:
If anyone is interested, I used:
$('audio').each(function(){
this.muted=true;
});$('audio').each(function(){
this.muted=false;
});
This solution doesn't seem to work in chrome, any ideas? - StevePrudHomme-Community MemberOk can i do this with a button in the player ? Or do I have to put the button on each slide ? I have a SCORM with 277 slide and I want to win some time !
Steve Flowers said:
OK, my friends. Here's a quick example and widget that will let you mute all audio. Note that this won't work in Preview or in HTML5 or iOS publish. It's Flash based and requires that you publish. If it doesn't work locally you may also need to add your publish folder to the Flash player security settings.
This does use JavaScript as an intermediary so that Flash can pick up variable change conditions from Storyline. Pretty straight forward. Let me know if you have any problems. - TonyJohnsonCommunity Member
Julie I got it working. never mind :)
Hi Kirby,
Where are you hosting the published content? you'll want to test it within the intended publish environment as detailed here. That article also has a few options for places to upload your content.
- KirbyWillisCommunity Member
Hosting via my personal website (per web publish) and on Scormcloud (via LMS publish) for testing purposes. In both cases, for the HTML5 output, the Javascript is being ignored. However, if I view the HTML5 file off my desktop, it works just fine.
Hi Kirby,
Javascript is supported in HTML5, but you'll want to ensure you're using an HTML5 supported browser. I'm unable to assist with specific Javascript elements, so you may want to post the example here for others in the community to take a look at.
Related Content
- 9 months ago