Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #398737 Score: 0
    Profile photo of Jason Craft
    Jason Craft
    Member
    beginner
    intermediate
    wise owl
    friend finder
    contributor
    curious george
    2 pts
    @jcraft6852

    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?

    • This topic was modified 2 years, 4 months ago by Profile photo of Jason Craft Jason Craft.
    #398740 Score: 0
    Profile photo of Jason Craft
    Jason Craft
    Member
    beginner
    intermediate
    wise owl
    friend finder
    contributor
    curious george
    2 pts
    @jcraft6852

    Forgot to mention I am using Lectora Online and publishing with seamless play.

    #398845 Score: 0
    Profile photo of Joe Wieloch
    Joe Wieloch
    Moderator
    beginner
    intermediate
    friend finder
    contributor
    LUC16 Attendee
    verified member
    wise owl
    LUC17 Attendee
    advanced
    picture perfect
    74 pts
    @wheels

    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.

    #398856 Score: 0
    Profile photo of Jason Craft
    Jason Craft
    Member
    beginner
    intermediate
    wise owl
    friend finder
    contributor
    curious george
    2 pts
    @jcraft6852

    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….

    #400604 Score: 0
    Profile photo of Jason Craft
    Jason Craft
    Member
    beginner
    intermediate
    wise owl
    friend finder
    contributor
    curious george
    2 pts
    @jcraft6852

    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.

    #400933 Score: 0
    Profile photo of Joe Wieloch
    Joe Wieloch
    Moderator
    beginner
    intermediate
    friend finder
    contributor
    LUC16 Attendee
    verified member
    wise owl
    LUC17 Attendee
    advanced
    picture perfect
    74 pts
    @wheels

    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.

    #400936 Score: 0
    Profile photo of Jason Craft
    Jason Craft
    Member
    beginner
    intermediate
    wise owl
    friend finder
    contributor
    curious george
    2 pts
    @jcraft6852

    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.

    #402028 Score: 0
    Profile photo of Jason Craft
    Jason Craft
    Member
    beginner
    intermediate
    wise owl
    friend finder
    contributor
    curious george
    2 pts
    @jcraft6852

    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)….

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

You must be logged in to reply to this topic.