Forum Discussion

Vic's avatar
Vic
Community Member
1 day ago

Audio on layers

Hi

I am creating a course which has audio on every base slide and every layer. I have a toggle on the slide master which sets a variable to true/false which, in turn, triggers whether the audio auto plays or not.

The problem I am having is that when the variable changes, the audio on every layer plus the base slide is triggered to play even though the triggers and the audio are only on their allocated layers and the layers aren't showing.

For example if I have a trigger on Layer 1 saying "'Play audio 'Audio 1' when Variable 'Audio' changes if 'Audio' = true" and a trigger on Layer 2 saying "'Play audio 'Audio 2' when Variable 'Audio' changes if 'Audio' = true", Both Audio 1 and Audio 2 will play when 'Audio' changes even though only Layer 1 is showing and Layer 2 is hidden.

Anyone come across this before? I've attached a stripped back story file.

8 Replies

  • Hey Vic​, 

    I understand that you're having trouble with Variable-controlled audio in Storyline. Great to see that the community has been helping you.

    I can confirm that we have this behavior logged as a bug in Storyline. This bug causes:

    • Media Trigger affects audio files on unvisited Layers when Triggered by a Variable change

     

    I've included your voice in the bug report that's being tracked so we can notify you as soon as a fix is ready. In the meantime, as a workaround, we suggest giving each Layer's Trigger a condition that's completely unique to that Layer.

    We appreciate your patience, and I'm sorry if this has been slowing down your build!

    • Vic's avatar
      Vic
      Community Member

      Thanks Steven. Good to know its a bug and not me overlooking something obvious.
      For anyone out there with the same problem, my workaround is to add a variable that names the layer that is active and add that variable as a condition to the 'Play audio' trigger. It's tedious but it works.

  • CarlFink1's avatar
    CarlFink1
    Community Member

    Is there a reason you can't just have your student mute the audio using the default volume control in the player, instead of your making a custom control? You could also make a custom button that just mutes audio (or rather, toggles it).

    • Vic's avatar
      Vic
      Community Member

      I'm not using the player :)

  • AndrewBlemings-'s avatar
    AndrewBlemings-
    Community Member

    I wouldn't expect this behavior and haven't tested it, but it is interesting as presented.

    I notice in your project that you use some "When the timeline reaches time 0m 0.1s" trigger conditions. Out of curiosity, is there a benefit to that over "When the timeline starts"?

    Also with timelines, I wonder if the Resume Timeline/Pause Timeline triggers wouldn't work better than Play audio triggers.

    If the audio files on layers don't have any triggers attached, they'll follow the timeline automatically. Any button that restarts the slide restarts the audio, and any trigger that pauses the timeline pauses the audio.

    Using Play audio triggers conceptually disconnects the audio files from their timelines, and I can see why a trigger to play a file would be more likely to produce the behavior you experienced than a trigger that controls only the active timeline(s).

    • Vic's avatar
      Vic
      Community Member

      Heh... I just tried using the timeline instead and it has the same problem

       

    • Vic's avatar
      Vic
      Community Member

      Hi Andrew. Thanks for your reply.

      The "When the timeline reaches time 0m 0.1s" condition is a suggested fix from another thread regarding a similar issue. It makes no difference as far as I can tell. I just haven't changed it back to 'When timeline starts'.

      Even if the audio is theoretically disconnected from the layer it is sitting on, the trigger that fires it is not. The problem seems to be that the trigger on the layer is being activated when the layer isn't even open.

      • AndrewBlemings-'s avatar
        AndrewBlemings-
        Community Member

        I get you, for sure. Very strange behavior, and not at all what should be happening. My suspicion is it's related to the one variable they all share. Not for this reason, but as a matter of practice I tend to either create individual did-they-visit-this-yet booleans or numeric progress counters to control things, so my initial temptation is to divide the variables and create one per layer: isLayer1playing, isLayer2playing, and so on.

        I have to confess I didn't really understand what the desired behavior is in your original post. You describe a problem, but depending on the goal, there might be different solutions. I noticed your player is hidden, so if the larger goal is to recreate a play/pause button for the learner, it might be do-able with a one-trigger button on a single master slide.