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.
I just observed that this flash-javaScript workaround doesn't work on Firefox or Chrome. It only works on IE. I downloaded the muteToggler attachment from this thread and published it and noticed that it only works on IE. Following are the details.
Storyline version used to publish:Update 3: 1305.2012
IE 8 + Flash Player 11.8.800.94 (works fine)
FF v23.0.1 + Flash Player 11.8.800.97 (doesn't work)
Chrome v29.0.1547.66 + Flash Player 11.8.800.97 (doesn't work)
By the way, looking for a solution to implement mute/ unmute in HTML5 output. any help on the same will be greatly appreciated.
Thanks
MK
You can use a trigger to execute this javascript code on HTML5 mode,
$('audio').each(function(){
this.pause();
});
This will pause all the audio which are active. You can execute this on conditional basis (say when timeline starts if variable audio = false) then call this code otherwise let the audio to play by default.
By the way, looking for a solution to implement mute/ unmute in HTML5 output. any help on the same will be greatly appreciated.
Thanks
MK
You can use a trigger to execute this javascript code on HTML5 mode,
$('audio').each(function(){
this.pause();
});
This will pause all the audio which are active. You can execute this on conditional basis (say when timeline starts if variable audio = false) then call this code otherwise let the audio to play by default.
By the way, i have accidentally pressed the suggested answer button on your reply. Could not find a way to undo it. Sorry about that!
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.
Hello,
Is it possible to add the Javascript HTML5 mute toogle into this sample file as well?
You may want to send Steve a private message if you need additional help with it as I'm not certain he is subscribed, but he did note that it won't work within HTML5.
I had different master slides with the same mute button, but depending on which master slide was used the mute button would still appear as if sound was not muted, so I added two slide triggers to all of my master slides, hope this helps someone else.
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.
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.
Ok 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 !
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.
141 Replies
That's a strange symptom. Do you have an example you can post? Would love to have a look.
Hi,
I just observed that this flash-javaScript workaround doesn't work on Firefox or Chrome. It only works on IE. I downloaded the muteToggler attachment from this thread and published it and noticed that it only works on IE. Following are the details.
Storyline version used to publish:Update 3: 1305.2012
IE 8 + Flash Player 11.8.800.94 (works fine)
FF v23.0.1 + Flash Player 11.8.800.97 (doesn't work)
Chrome v29.0.1547.66 + Flash Player 11.8.800.97 (doesn't work)
Has anybody experienced same issue?
Thanks in advance
MK
Hey MK - are you running these locally or from a remote host? Sounds like the Flash Player Security Sandbox could be playing its hand.
Hi Steve, yes its working fine on all the browsers when run from a remote host.
Thanks for the input. It helped.
MK
By the way, looking for a solution to implement mute/ unmute in HTML5 output. any help on the same will be greatly appreciated.
Thanks
MK
Glad i found this post! Steve Flowers - Thanks a ton!
You can use a trigger to execute this javascript code on HTML5 mode,
$('audio').each(function(){
this.pause();
});
This will pause all the audio which are active. You can execute this on conditional basis (say when timeline starts if variable audio = false) then call this code otherwise let the audio to play by default.
By the way, i have accidentally pressed the suggested answer button on your reply. Could not find a way to undo it. Sorry about that!
Hi Electron! Thanks for sharing and I can undo that button push
No problem!
Hello,
Is it possible to add the Javascript HTML5 mute toogle into this sample file as well?
Much appreciated
Julie
Hi Julie,
You may want to send Steve a private message if you need additional help with it as I'm not certain he is subscribed, but he did note that it won't work within HTML5.
If anyone is interested, I used:
$('audio').each(function(){
this.muted=true;
});
$('audio').each(function(){
this.muted=false;
});
Thanks Julie for sharing what you ended up using here!
Quick Tip:
I had different master slides with the same mute button, but depending on which master slide was used the mute button would still appear as if sound was not muted, so I added two slide triggers to all of my master slides, hope this helps someone else.
Thanks Jeff for sharing what you found here. Have a great Friday!
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!
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.
This solution doesn't seem to work in chrome, any ideas?
Hi Julie, thanks for this. What do you attached the code to? I got the flash version to work, but want to get the html5 version to work as well.
Tony
Julie I got it working. never mind :)
I know this is an old post, but has anyone ever gotten the Javascript mute code to work in Chrome? It works locally, but not when hosted remotely.
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.