Controlling Page Transitions with Audio - Liz Craig
December 15, 2020 12:00 AM
Looking for suggestions for our friend Liz in Colorado. What are your thoughts on her situation?
"I want to know how best to control when the pages transition.. .we want the users to listen to the audio in its entirety before advancing.
So, is this an action with the next button, the audio, or do I need to (gasp) create a variable?"
Discussion (3)
You could simply add an action to your audio that says "OnDonePlaying" set state or show your next button - but if this is a page users go through multiple times, then they'll have to listen to the audio EVERY time, so in addition to that action, I'd add another "OnDonePlaying" that updates a variable from 0 to 1. On top of that, you'll want an "OnPageShow" action at the page level that is looking for your variable with a condition that says if that variable is 1, set state or show your next button.
So, if the user comes to the page and it is their first time, they have to listen to the whole audio before they can leave the page. If this is a repeat visit, the next button will appear and they can move on, or listen to the audio at their discretion.
Hope this makes sense!
Okay, great, that worked. I had to add to each page, however, so that the pages didn't pull a full stop. Thank you!
Discussions have been disabled for this post