Forum Discussion

Liz_Tyler's avatar
Liz_Tyler
Community Member
5 days ago

Seekbar disabling after video completion

Hi,

I was wondering if there is a way to disable the seekbar in Storyline after a video completes. I want to give my users access to drag the seekbar on their first viewing of a video, but I don't want it to be draggable once the video completes until they press replay. As it is now, they can drag it back through the video, but it doesn't play or have any functionality after the first viewing, so I would rather it was disabled at that point so that it only works again once replay is clicked on (which does work and starts from the beginning at that point, as it should). Any advice please?

10 Replies

  • JHauglie's avatar
    JHauglie
    Community Member

    May I ask: Why would you want to permit them to drag and manipulate the video seekbar on their first pass through the video? The intuitive behavior is to drag and manipulate the video after watching it through at least once. (And as it sounds like you know, that's how the controls are configured in SL.) If the intention is to require them to click a "replay" button before the seekbar is disabled, you may simply need to duplicate the slide and video; on the first pass, they can click and drag the seekbar as they want, but when they click a Replay button (you would create that), they actually advance to the next slide, which has the controls locked down, and then they could watch the video again.

    But as I said, this seems almost counter-intuitive, and potentially very frustrating for your learners.

  • Liz_Tyler's avatar
    Liz_Tyler
    Community Member

    Thank you. In short, I have a need to create a module where the user can skim through the video if they wish. They don't have to watch all of the instructional content, as they may know some of the instructions within it. I want them to be able to do the same when they replay the video. I just don't want them to be able to use the seekbar after the video finishes, as the functionality just isn't there at that point, which is just confusing for the user. I want them to click on replay to repeat the functions from the first watch (which I have created and that all works fine).

  • Nedim's avatar
    Nedim
    Community Member

    Your best option is to use JavaScript, as this functionality isn't built-in by default. Run the following script when the timeline ends on a slide:

    const seek = document.querySelector('#seek');
    const reset = document.querySelector('#reset');
    
    seek.style.pointerEvents = 'none';
    
    reset.addEventListener('click', function () {
      seek.style.pointerEvents = 'all';
    });




    • Liz_Tyler's avatar
      Liz_Tyler
      Community Member

      Thank you for that. I tried it and while it does prevent the use of the seeekbar once the video is viewed, it also blocks it when replay is chosen and I want the seekbar to be available again at that point. Is there any way to make the seeekbar functional again on clicking a replay button?  I'm very appreciative of your time, though. Thanks again,

      • Nedim's avatar
        Nedim
        Community Member

        I may have misunderstood your original post. The script blocks the timeline seekbar when it reaches the end, and clicking the Replay button unlocks it again.

        Are you referring to the video seekbar specifically? I don’t see a Replay button in the video controls. Do you mean clicking the Play button again to replay the video?