Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #415975 Score: 0
    Profile photo of Benjamin Montag
    Benjamin Montag
    Member
    beginner
    intermediate
    curious george
    wise owl
    friend finder
    @bmontag3740

    Is there a way to script a skip to a section of audio, i.e. begin playing 5 seconds from the start of audio clip, without putting a play head into the presentation?

    #415983 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
    51 pts
    @wheels

    You should be able to use the setTrackTime(time) method.

    There is also a getTrackTime() method that you can use as well.

    I’m attaching a sample title.

    Note that the sample title uses the HTML name of the object. Instead I suggest you use the script token %HTMLNAME% in place of the actual HTML name. To do this the action would have to be attached to the audio object (for the token to work).

    An alternative is to place an onShow Run JavaScript action on the audio object with the following code:
    getDisplayWindow().myAudioObject = %HTMLNAME%;

    Then in any JavaScript action you can reference the audio object as window.myAudioObject so you could call the above method like this:

    getDisplayWindow().myAudioObject.setTrackTime(time);

    For more information on these tokens see:
    https://www.trivantis.com/help/Lectora_Online/4.3/en/HelpHTMLs/Content/5565.html

    • This reply was modified 7 months, 2 weeks ago by Profile photo of Joe Wieloch Joe Wieloch.
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.