Explore the community Forums Lectora Lectora Questions & Answers Triggering audio on mobile without user interaction

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #350841 Score: 0
    Profile photo of kc raven
    kc raven
    Member
    beginner
    intermediate
    wise owl
    friend finder
    curious george
    contributor
    1 pt
    @kraven7771

    I’m trying to figure out a work around for this little clip of audio that comes after the slide’s main audio. It’s a simple short ‘Click Next’, and on responsive I can’t seem to get the ‘Click Next’ audio to play when the main audio is done without  user interaction.

    I have several slides where I can’t simply slap the ‘Click Next’ audio to the main audio because some have their main audio content change base on their interaction.

    I thought once the user triggered the first audio, you could have another audio play without a user interaction after it.

    I’m tried

    -OnDonePlayAudio

    -OnDoneRunGroup > PlayNextAudio

    -OnDoneRunJavascript > audioname.mediaElement.play();

    -OnDoneRunGroup > RunJavascript > audioname.mediaElement.play();

    -OnDoneShow object > OnShowPlayNextAudio

    Audio events > near end of audio > Event PlayNextAudio

    Is there something someone else has done, that they found works?

    • This topic was modified 1 month ago by Profile photo of kc raven kc raven.
    #350852 Score: 0
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    178 pts
    @timk

    You could try to play the second audio on one of the user interactions, pause again immediately and see whether it can be continued without interaction. As far as I know it’s not really the playing that’s prevented it’s the download of the file that requires user interaction. It may be useful to add .5 seconds of silence at the beginning of the audio so you have some time to pause.

    #350856 Score: 0
    Profile photo of Darrel Somoza
    Darrel Somoza
    Member
    contributor
    friend finder
    beginner
    intermediate
    junior moderator
    advanced
    wise owl
    curious george
    130 pts
    @Klaatu

    Tim has the right idea for a work around. On the first audio put an ondone action that will play the second audio. Put a button on the page with three actions. 1. onclick play audio 2. onclick stop audio 2. 3. onclick play audio 1. When audio 1 finishes audio 2 will autoplay on mobile.No pauses necessary.

    The starting and stopping of the second audio before playing the first is imperceptible.

    #350858 Score: 0
    Profile photo of Darrel Somoza
    Darrel Somoza
    Member
    contributor
    friend finder
    beginner
    intermediate
    junior moderator
    advanced
    wise owl
    curious george
    130 pts
    @Klaatu

    Oh, I left it out because I thought it was obvious, you must start the first audio with the button not the player.

    #350860 Score: 0
    Profile photo of kc raven
    kc raven
    Member
    beginner
    intermediate
    wise owl
    friend finder
    curious george
    contributor
    1 pt
    @kraven7771

    okay, thanks.

    I’ll give this a try. I didn’t think of doing that before.

    #350862 Score: 0
    Profile photo of Darrel Somoza
    Darrel Somoza
    Member
    contributor
    friend finder
    beginner
    intermediate
    junior moderator
    advanced
    wise owl
    curious george
    130 pts
    @Klaatu

    LOL, I just re-read the actions on my first post above and while I think you probably get it, I left out the numeral indicating step 2 so here it is again properly.

    1. OnClick play Audio 2 (the one you want to autoplay after the first)
    2. OnClick stop Audio 2.
    3. OnClick play audio 1 (The one with the OnDone action that will now start the second audio)

    Start the audio by using the button, not the player.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.