Forum Forum

Retour

Background Audio

Bascule
Background Audio
Réponse
17/06/24 15:46
Hello SB Team!  
I've been experimenting with background audio.  I set up some blocks to capture the time of the audio (in a variable) when a button is clicked to turn to the next page.  I then set up blocks on the next page to get that time and set the audio current time to the variable and play the audio clip.  However, when I turn the page, the audio is starting from the beginning again.  Any ideas?
0 (0 Voter)

RE: Background Audio
Réponse
17/06/24 16:18 en réponse à Scott Sheridan.
Hi Scott,
  1. I would put the audio on a Master Page! Then you need zero actions, and it will continue to play while pages are changed. As you're aware, you can have multiple Masters in your lesson, and if you'd like, you can choose to have a BG-audio Master only on certain pages if you want (or build it into your main Master, whichever makes more sense).
  2. If you want to keep your current set up, Page.onLoad might be firing before the audio has had a chance to load in on the next page. You can try adding a 0.5 second wait block and turning off the audio's autoplay, and/or using the Audio.onShow as your trigger.
  3. I haven't known many learners that enjoy having background audio in their lessons! If you've got a pause/mute button, it's probably fine. Having it on a Master will simplify those actions as well. 
Hope that helps!

- Nav
0 (0 Voter)

RE: Background Audio
Réponse
17/06/24 18:12 en réponse à Navdeep Dhillon.
Hi Scott (and anyone else watching this),
Here's a video tutorial that shows you how to add a separate Master to handle the audio - https://share.smartbuilder.com/public/support/background-audio-in-your-lesson.mp4

Hope that helps!
0 (0 Voter)