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.
Unfortunately, there's no built in trigger for muting / unmuting audio in Storyline. This would make a dynamite feature request. I think others would also love to see this type of feature.
does information found at this link give either of you any thoughts if this can be re-written in a way to incorporate as java script in a Storyline trigger?
I am not a javascript writer, so it is somewhat Greek to me.
It's likely possible in the HTML5 version to trigger audio level changes via JavaScript. Currently, in the Flash-based output, volume is controlled through the compiled player and we don't have access to any exposed functions for controlling volume / mute other than the volume control in the built-in navigation bar.
It may be possible to embed a Flash file that would provide global volume control but it wouldn't be linked to the built-in control and I'm not completely sure how reliable it would be. The problem isn't a JavaScript problem It's a Storyline player issue. It may be possible to workaround it.
I'll grab 15 minutes this afternoon and build / test one. If it works, I'll post the file and instructions for use.
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.
Unfortunately, there's no built in trigger for muting / unmuting audio in Storyline. This would make a dynamite feature request. I think others would also love to see this type of feature.
Super Hero - Steve Flowers: thank you for the solution.
I'm wondering: do you have the Flash source file? Also, I'm wondering since it is using Javascript, if it can't be modified to operate as a custom scripted trigger, so that it doesn't relay on a external SWF? I'm not a javascript writer so I'm somewhat at a loss to take this any further. We're often doing a build-once/run-twice approach, so having a solution for only flash is limiting.
Happy to post the FLA once I find it Since there aren't any JavaScript > Storyline Player commands to modify the volume of the player, this was the only way to accomplish it so far. This uses native ActionScript commands to modify the volume globally. The JavaScript was put in place to round trip between Storyline and Flash. Since the SDK and API for the SL player hasn't been revealed, it wasn't possible to communicate between the two SWF's directly.
I'd love to see some JavaScript commands to modify states in the player. Things like:
JumpToSlide(ID);
MutePlayer();
Pause();
Play();
These would be super handy. Join me in submitting a feature request:)
The toggler is a global effector. So it'll mute everything everywhere, even if a layer. Variables are also global, so you should be able to toggle these from anywhere as well.
I was super excited to find this post because I was having the exact same issue. The only problem is that I discovered that now that I have added the togglemute widget to my project, the restart buttons no longer work. I confirmed that it is in fact the widget that makes them not work anymore, since when I deleted it they worked once again.
My restart buttons are "home made" from images with "hover" and "down" states, and a "jump to" trigger leading the to current slide. This is the only solution I have found for a custom restart button, as the only available "restart" trigger is "restart course" and not "restart slide."
Are any of you having this same problem? I have not been able to find a solution yet, so if you have any ideas they would be much appreciated!
141 Replies
Hi, Patrice -
Unfortunately, there's no built in trigger for muting / unmuting audio in Storyline. This would make a dynamite feature request. I think others would also love to see this type of feature.
Yep, I figured that much. What I'm hoping is that someone knows some Javascript I can use to build custom triggers for mute and unmute.
-phs
There is no exposed API so there is no way to mute the storyline player, you need access to a mute function in the player to do this using javascript.
TBH if Steve cannot do it, it cannot be done yet
Steve, Phil,
does information found at this link give either of you any thoughts if this can be re-written in a way to incorporate as java script in a Storyline trigger?
I am not a javascript writer, so it is somewhat Greek to me.
Thanks.
It's likely possible in the HTML5 version to trigger audio level changes via JavaScript. Currently, in the Flash-based output, volume is controlled through the compiled player and we don't have access to any exposed functions for controlling volume / mute other than the volume control in the built-in navigation bar.
It may be possible to embed a Flash file that would provide global volume control but it wouldn't be linked to the built-in control and I'm not completely sure how reliable it would be. The problem isn't a JavaScript problem It's a Storyline player issue. It may be possible to workaround it.
I'll grab 15 minutes this afternoon and build / test one. If it works, I'll post the file and instructions for use.
http://stackoverflow.com/questions/6442427/muting-a-html5-audio-element-using-a-custom-button
I guess it would help if I posted the link.
Thanks, Steve Flowers, for devoting some time to this. Your Iron Man persona is well-earned!
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.
I said if anyone could
Nice ~Steve
I haven't been able to fully download update 1 yet. With my luck the crew added a trigger to accomplish this
LOL
Way to go, Steve!
Awesome! I appreciate your sharing your expertise with those of us who are less technically astute!
This is super awesome!!! i have been struggling with this for weeks and only now came across this post!
Super Hero - Steve Flowers: thank you for the solution.
I'm wondering: do you have the Flash source file? Also, I'm wondering since it is using Javascript, if it can't be modified to operate as a custom scripted trigger, so that it doesn't relay on a external SWF? I'm not a javascript writer so I'm somewhat at a loss to take this any further. We're often doing a build-once/run-twice approach, so having a solution for only flash is limiting.
Thanks for your (additional) thoughts and help.
Happy to post the FLA once I find it Since there aren't any JavaScript > Storyline Player commands to modify the volume of the player, this was the only way to accomplish it so far. This uses native ActionScript commands to modify the volume globally. The JavaScript was put in place to round trip between Storyline and Flash. Since the SDK and API for the SL player hasn't been revealed, it wasn't possible to communicate between the two SWF's directly.
I'd love to see some JavaScript commands to modify states in the player. Things like:
JumpToSlide(ID);
MutePlayer();
Pause();
Play();
These would be super handy. Join me in submitting a feature request:)
A few folks have asked about the source for the SWF. It's a pretty simple file. Attached here.
This is a big request - but any chance we could get the fla in CS5? We aren't upgrading to 5.5 and I can't open the FLA file unfortunately..
Hi, Phoebe -
Here it is in version CS4.
Awesome - you are indeed a Super Hero!!!!!!!!!!!!!!!!!!
Hi Steve, does your toggler work for audio in a layer, and if the variables are assigned to a marker?
The toggler is a global effector. So it'll mute everything everywhere, even if a layer. Variables are also global, so you should be able to toggle these from anywhere as well.
Steve
Hello everyone!
I was super excited to find this post because I was having the exact same issue. The only problem is that I discovered that now that I have added the togglemute widget to my project, the restart buttons no longer work. I confirmed that it is in fact the widget that makes them not work anymore, since when I deleted it they worked once again.
My restart buttons are "home made" from images with "hover" and "down" states, and a "jump to" trigger leading the to current slide. This is the only solution I have found for a custom restart button, as the only available "restart" trigger is "restart course" and not "restart slide."
Are any of you having this same problem? I have not been able to find a solution yet, so if you have any ideas they would be much appreciated!
Thanks,
Allison