Global Audio Controller

jcraft6852
jcraft6852 Community Member Posts: 22
I am trying to have a single audio controller at the global level of a title, and then change the audio src and play the audio on each page through a runJS action. I can't seem to figure out how to access the global audio controller from the page level. Tried using the HTML name of the audio controller a few other permutations, but no luck.

Does anyone have any suggestions? Or advice on a different approach all-together?

Comments

  • jcraft6852
    jcraft6852 Community Member Posts: 22
    Forgot to mention I am using Lectora Online and publishing with seamless play.
  • wheels
    wheels Community Member, Administrator, Moderator, Rockstar Manager Posts: 530 eLearning ROCKSTAR Admin Team
    If you are using a Lectora Audio object you can do a Change Contents action on the AudioObject.  That's the most standard way to do it... or do you have a special way you are implementing audio?

    Page Object -> Action: On Show -> Change Contents -> select the audio object and the audio resource you want to play.
  • jcraft6852
    jcraft6852 Community Member Posts: 22
    Thanks for the suggestion Joe, I should have indicated that we are using streaming audio and hosting the audio files on a different server. The Change Contents action only seems to allow the selection of audio files that are imported into the title. I was trying to use a Run JavaScript action to get the audio controller at the global course level, swap out the src, and play the new audio. But I couldn't even figure out how to properly get the audio controller....
  • jcraft6852
    jcraft6852 Community Member Posts: 22
    I finally figured this out. It's a little clunky, and I'm sure there's a better/more efficient way to do it. But I now have a global (top level) audio controller that streams audio in which I feed in the path at the page level through run JS actions. I'm accomplished my goal of keeping our audio outside of the course, and only have one instance of the audio controller, instead of an audio controller on every page with audio.

    I just wanted to update in case anyone came across this, no need to duplicate efforts. I'd be happy to share details if anyone else is interested.
  • wheels
    wheels Community Member, Administrator, Moderator, Rockstar Manager Posts: 530 eLearning ROCKSTAR Admin Team
    Hi Jason, glad you did get this working.  Using our player it should allow you to set a variable as the URL for the video, then you could change the variable for each page.  Unfortunately this isn't working at this time.  I have written this up and referenced this post.  Sorry for the inconvenience.
  • jcraft6852
    jcraft6852 Community Member Posts: 22
    Thanks Joe, that's funny, I remember trying to use a variable as the URL for the audio, but I couldn't get it to work. Just figured it was on my end. Thanks for writing it up, perhaps I'll switch over to the URL variable method once the issue gets resolved. I've been testing what I built with dozens of pages all using the same instance of an audio controller and it seems to be working great. I do feel though that there's probably a better way to do it.

    I'm always amazed at level of flexibility this framework allows for. Thanks again for your time/help.
  • jcraft6852
    jcraft6852 Community Member Posts: 22
    Hi Joe, did your team get the audio URL variable method working? My way of doing it works great on laptop environments, but won't load on mobile devices unless I click the play button (even when publishing to seamless play). I've tried all kinds of work-arounds to get the audio to auto start on mobile. I was thinking I'd try your way, if your team has made any progress (set a variable as the URL for the audio, then change the variable for each page)....
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!