Audio Function - Play-From-To

jasonadal
jasonadal Community Member Posts: 439 ♪ Opening Act ♪
Howdy all! Long time no post!

Quite some time ago, several folks helped put together a Play-From-To function for the audio player. To summarize, the goal was to have an audio file that played from one specific time stamp and pause at another and/or jump between start points based on button clicks.

It worked GREAT in Lectora 16, but as was the case in my custom skin, I'm finding that something with Lectora 18 has broken part of the function. Originally, if you started the audio at 0:00, it was set up to automatically stop at a specific time stamp. Then, if the user clicked on a button, the audio would jump to a new starting time stamp and pause at the end of that segment.

However, with the upgrade to v18, the audio is no longer pausing at the appropriate times - the jump to and play works, but the pause is failing. I just can't figure out where the issue is, given the changes to the media player. I did notice that there's a new JS file in the root folder of the HTML published version called "mediaelement-and-player.js". I'm wondering if that has an impact on one section of the JavaScript attached to the player:
player = new MediaElement(pageaudio);
I have no idea where to go and it's been long enough that I'm rusty on recalling, even with Tim's earlier fantastic explanation, where I might look for the fix.

Comments

  • timk
    timk Community Member Posts: 1,176 ☆ Superstar ☆
    Hi Jason,

    I'm working on an update.

    What's the "Play full audio" button supposed to do? It's currently playing an interval but not the full audio.
  • jasonadal
    jasonadal Community Member Posts: 439 ♪ Opening Act ♪
    Hi Tim! Thanks for picking up and taking a look at that again. I just remembered that there is a now a "Set time" action that can be applied to buttons that control the audio in version 18, so I'm going to see how that starts working.

    For this page, that play full audio is set, for some reason, to only play the audio for the first button, which is a goof on my part. It's supposed to play the full audio file starting at the audio for the first button. I and my QA team must have missed it in during testing prior to originally publishing the course.

    *Edit - I just realized that the "play full audio" is going to take a little more work, since the pause has to be an event on the audio file, and you can't set conditions on events :(
  • timk
    timk Community Member Posts: 1,176 ☆ Superstar ☆
    You can make the event run action group and give the actions in the group a condition.

    Here's my new version. With the new "Set time" action, there's hardly any external javascript left...
Sign In or Register to comment.

So You Wanna Be An eLearning ROCKSTAR?

We're all fans of eLearning here! Want to become an eLearning ROCKSTAR? Just click on one of the buttons below to start your rocking journey!