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
- JeffSaleCommunity Member
Thanks Jeff for sharing what you found here. Have a great Friday!
- 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.