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
141 Replies
- ErnestoRaymundoCommunity Member
Thanks, Nigel! It works perfectly.
DS.appState.onToggleVolume();
- ganeshubhare-d9Community Member
Hi,
Tried the solution today and it does not work in the latest version of storyline 360
- RobynPillar-2a6Community Member
OMG this is EXACTLY what I've been searching for!!
- DiarmaidCollinsCommunity Member
Excuse me for being a bit dense there. I was overcomplicating things. I simply had to create my own variable (MuteAudio) and add that to the button and set it to toggle. That way the module is able to 'monitor' the code you've provided and adjust the state on every new slide accordingly.
- LizzieAngellCommunity Member
no worries - i think it is something we all do once we start looking at the complications of javascript!
- DiarmaidCollinsCommunity Member
Hi Lizzie. I didn't see that you had written your response hours ago!
Many thanks for your help. I am glad I was eventually able to figure it out for myself. I feel a little happier about being a little less thick! :)
- ShahabKhanCommunity Member
Hi everyone,
I use this JS but its working on 18 august 2020 STL 360 version.
var appState = require("helpers/appState");
appState.onToggleVolume();//muteAnyone have a solution for this issue.
- BettyChaboui885Community Member
Hi,
a colleague of mine helped me with this javascript :var appState = window.DS ? DS.appState : require("helpers/appState");
appState.onToggleVolume(); - SuvarnaR-47dd39Community Member
I need to custom the audio button. i have one button it will mute the audio or unmute the audio. But i dont know the javascript. so please explain me in detail. I m working on SL360.
- SuvarnaR-47dd39Community Member
Also, i want to mute the audio of video file.
- AndrewHoskins-eCommunity Member
This is a crazy old post - has a feature to install a custom button that can mute audio ever been created?
Is there better javascript available yet to do this? It would really help me with a project.
Related Content
- 9 months ago