Muting Audio when course starts
Feb 10, 2023
By
Shawna Gigs
I am using the code:
//mute/unmute
// Use the global DS object if it exists, otherwise try require:
var appState = window.DS ? DS.appState : require("helpers/appState");
appState.onToggleVolume();
on a custom mute/unmute button and it work great, but I want the audio file to automatically be muted when the course first starts. The user would have to click to turn the mute button off to listen to the audio. Is this something that has to be done in js?
6 Replies
Hi Shawna,
I'm happy to chime in! You might find that the solution below, using triggers and a custom variable may work. The recent Conditional Trigger Enhancements in Storyline 360 allowed for a more streamlined approach. Please check this annotated screenshot of the triggers.
I attached the sample Storyline project for your reference. Let me know if that works for you!
Hi Eric,
Thank you for your suggestion. This will come in handy for some other project I am working on, however for this one I do need to mute the audio, not stop the audio and then start the audio from the beginning again.
I'm hopeful there is an easy piece of javascript that I can add that will mute the audio on load.
I'm happy to help, Shawna! Glad to hear the suggested solution is useful for your other projects! I hope our JavaScript experts in the community can chime in with their recommendations.
Enjoy the rest of your day!
Any JS experts out there?
this are the possible command to change the audio level
you can mute audio with
and set to the default player audio level with
you don't need ... require("...") - this was for earlier storyline versions
Thank you so much! This is a perfect solution to meet my need.