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
The code is where I get lost and have to step back and let the community take over. Sorry! I'm not sure if folks are still subscribed here, as the post is a bit older - but you could always use the "contact me" button on a ELH users' profile to reach out to them directly!
- HeinrichMain609Community Member
- AshishYadavCommunity Member
where we can put this code
var appState = require("helpers/appState");
appState.onToggleVolume();//mute- CesarCarranza-bCommunity Member
THX works great with 360.
- CesarCarranza-bCommunity Member
Hi there, I'm facing some trouble with audios, when I move to the next slide the audio begin to sound. Any Ideas please!!!
Thx, César.
- LizzieAngellCommunity Member
you need to use a 'Execute JavaScript' trigger and then copy and paste in the code:
var appState = require("helpers/appState");
appState.onToggleVolume();//mute
- NicoleRalph-117Community Member
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
- LizzieAngellCommunity Member
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.
- NicoleRalph-117Community Member
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
- jamiefaull-c61cCommunity Member
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.
- JuliaSotoAlvareCommunity Member
I understand that I have to create trigger: Execute JavaScript
var appState = require("helpers/appState");
appState.onToggleVolume();//mutewhen 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.
- BobODonnellCommunity Member
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.
- JasonEggert-270Community Member
Thank you so much! This is awesome!
- TehreemHassanCommunity Member
thanks for help
- ErnestoRaymundoCommunity Member
Same here. The scripts that I used last year are not working now.