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

133 Replies
Nicole Ralph

Hello.

We have noted on a an IE browser after publishing a project the JavaScript for Mute/Unmute will not execute and the volume remains on.  Is there likely to be an 'odd' browser setting preventing this?  We are pointing our finger at the computer/browser because the Mute/Unmute works perfectly on 99% of devices tested.

Best regards,

Nicole

Lizzie Angell

Just tested one of our courses here on IE and the mute/unmute seems to be working fine.

We are using the 'classic' player with the buttons hidden and bespoke ones built.

I believe there maybe some function difference if you are using the 'modern' player but have not tested that myself.

Nicole Ralph

Thank you for your input. We are using classic player and bespoke navigation via storyline 360
**** CONFIDENTIAL ****
The information in this message and in any attachments may be confidential. If you are not the intended recipient of this message, you must not read, forward, print, copy, disclose, or use in any way the information this message or any attachment contains. If you are not the intended recipient, please notify the sender immediately and delete or destroy all copies of this message and any attachments. VICSES IS Service Desk 1300 737 101

Nicole Ralph

Thank you! That does make a lot of sense. Much appreciated
**** CONFIDENTIAL ****
The information in this message and in any attachments may be confidential. If you are not the intended recipient of this message, you must not read, forward, print, copy, disclose, or use in any way the information this message or any attachment contains. If you are not the intended recipient, please notify the sender immediately and delete or destroy all copies of this message and any attachments. VICSES IS Service Desk 1300 737 101

Jamie Faull

Does anyone have a solution if you  have two or more audio files playing but you just want to mute one file and let the others keep on playing? example :   3 audio files  1. drums 2. bass guitar 3. piano ...  when timeline starts all audio is triggered to start playing. When user clicks on drums mute button it mutes drums then unmute when clicks again and the drums are still in sync with the other media.     

Julia Soto Alvarez

I understand that I have to create trigger: Execute JavaScript 

var appState = require("helpers/appState");
appState.onToggleVolume();//mute

when user clicks "Audio off" button 

 

But how do I create the trigger to turn the audio back on?

Note that I have different audios in each slide. The player is disabled and I have custom menu buttons. I would like the button in the main menu to mute all audios in all the slides, if possible. Alternatively, and if it's the only way in which this works, I can add this mute/umute button in each slide. 

 

Any help with this would be very much appreciated! 

Best, 

Julia. 

Bob O'Donnell

Its a "toggle". Click once, the audio is off. Click again, the audio is back on. If you have to comply with Section 508 you'll need to create a button state with text or an icon showing which state the button is currently in. For instance, when selected it could say "Audio Muted" and/or have the "No" symbol on it.

Our button is on the interface, so it was placed 1 time in the Slide master and it appears on every screen.

Good luck.