Skip to main content
Inspiring
August 13, 2018
Question

Progress bar = pausing the playhead?

  • August 13, 2018
  • 1 reply
  • 373 views

Hello again...

a customer wants the progress bar which I am not a fan of.

If I drag the progress around it seems to stop the project at the frame it is dragged to. Is there a way to tell it to continue wherever it is dragged?

Thanks!

    This topic has been closed for replies.

    1 reply

    TLCMediaDesign
    Inspiring
    August 13, 2018

    There is a way with JavaScript.

    You would need to create a JS file and include it in the head section of the html.

    The JavaScript would be:

    var interfaceObj, eventEmitterObj;

    window.addEventListener( "moduleReadyEvent", function( e )
    {
        interfaceObj = e.Data;
        eventEmitterObj = interfaceObj.getEventEmitter();
    initializeEventListeners();
    });

    function initializeEventListeners()
    {
    if ( interfaceObj )
    {
      if ( eventEmitterObj )
      {
       eventEmitterObj.addEventListener( 'CPAPI_ENDPLAYBARSCRUBBING', endScrub, false );  
      }
    }
    }

    function endScrub()
    {
    window.cpCmndResume = 1;
    }

    Inspiring
    August 14, 2018

    Thank you.

    I have to admit that I have never used Java and would not know where to put it in...

    Is it the "index scorm.html" file in the zip once you publish for LMS?

    It has to be put it at the start by opening it in an editor and pasting it in?
    Where exactly?

    Did you ever do this for a course?
    Are there any unforeseen other effects because of that?

    Sorry for all my questions...

    TLCMediaDesign
    Inspiring
    August 14, 2018

    It would be in the index file.

    Whatever you name the javascript file, insert it in the head section just above the opening <script> tag. Put the JavaScript file in the assets/js folder.

    <script src="assets/js/yourfilename.js"></script>

    I can't think of any side effects.