Forum Discussion
Reset Marker state when audio done
Hello! Thanks Tipsqueak for this great video on using audio with markers. As shown at 3:50 in the video, I am using a marker in Storyline 360 to allow learners to play optional audio on a slide. The "Audio from File" option was used to insert the audio onto the marker and the Audio Only option is enabled for the marker. The Normal state of the marker displays a play icon and the Selected state shows a pause icon. As the audio plays, the learner can toggle between pausing and playing and the icon changes appropriately.
The only issue is when the audio is done playing, the pause icon remains displayed but if the learners clicks the marker, it replays the audio (so clicking pause now plays). The icon is now play and, if selected, it pauses the audio (so clicking play now pauses). The functionality is fine (I want the learner to be able to replay the audio if they want) but the functionality is now out of sync with the icon that is displayed. Is there any way to reset the marker state to Normal when the marker audio is done playing? Or another way to fix this? Thanks!
I don't believe the media states nested inside the marker can be controlled by triggers. To change the state of the icon after the audio completes, the marker content needs to be closed, which requires clicking the marker. In this scenario, I would use a JavaScript solution to target the audio inside the marker, and when the audio finishes, simulate a marker click event to change its state. Maybe something like this:
I've attached a short video demonstrating this. I hope there is a simpler and better solution that doesn't involve JavaScript, but I just can't figure it out at the moment.
- NedimCommunity Member
I don't believe the media states nested inside the marker can be controlled by triggers. To change the state of the icon after the audio completes, the marker content needs to be closed, which requires clicking the marker. In this scenario, I would use a JavaScript solution to target the audio inside the marker, and when the audio finishes, simulate a marker click event to change its state. Maybe something like this:
I've attached a short video demonstrating this. I hope there is a simpler and better solution that doesn't involve JavaScript, but I just can't figure it out at the moment.
- TracyDunhamCommunity Member
Thanks Nedim, much appreciated!
- SamHillSuper Hero
Hi TracyDunham I think you would be able to do this by using a trigger on the media completing. For example, when the audio completes, check the state of the marker to the desired state.
- TracyDunhamCommunity Member
Thanks Sam - That was my thought also but could not find a way to do it