Forum Discussion

CharuSachdeva-a's avatar
CharuSachdeva-a
Community Member
2 months ago

Stop all sounds action

I have a file where I need to play audio through different buttons on the slide. Its like listening to the audio pieces by clicking on the play button against them. When I used show layer options to play different audio/video pieces, it overlaps with each other. I dont want to use a looooot of show/hide commands. Is there a stop all sounds command yet in storyline?

  • You can place this into a trigger and use it to stop all the audio tracks playing on a slide, including any active layers. 

    var el = document.querySelectorAll("audio");
    el.forEach((item)=>{item.pause()});

     

  • Are you trying to stop all audio or stop all audio other than the one that is currently playing? If you want the layers to stop the audio on the base layer when you click your buttons, go to the layer properties for each layer that is not the base layer, and select the box to pause the timeline of the base layer.