Forum Discussion

SusanLythe-a3d2's avatar
SusanLythe-a3d2
Community Member
6 months ago

Videos continue to play after navigating away from the window

I’ve uploaded a zip file to the company LMS and everything is working great, apart from one thing… if I navigate away from the window, it should pause videos playing - like it does with other zips I’ve uploaded, but it doesn’t.

I’m thinking the issue might be down to the Slide Properties or Triggers, so here’s what I’ve set in the .story file:

  1. Player Style=Modern and Play Video=Automatic
  2. Player Options (When Revisiting) is set to "Resume on Restart".
  3. I’ve set True/False variables set to False on specific slides to track completion from a Main Menu slide. Then, on the Main Menu I’ve added triggers which set the state of those specific slides to completed state when timeline starts on any of those slides if value = True.
  4. Also, the Slide Properties “When Revising” option is set to a mix of the 3 options throughout the entire file, as some need to “Reset” if returned, whereas others need to “Resume” to where they left off; and some remain as “Automatic”.  

Like I say, everything is working perfectly fine, except when moving away from the window.  Anyone any ideas?

  • To add to the above, I've been testing on a different .story file which has a mix of the 3 Slide Properties (Resume, Reset, Auto) and pauses if moved away from the LMS window it's playing within.  So as a test, I changed 4 Slide Properties and uploaded into LMS and now it doesn't pause.  I've even reset the 4 Slide Properties I changed and it still doesn't pause.  My conclusion here is there is a bug... unless anyone can help.

  • Nedim's avatar
    Nedim
    Community Member

    As I understand it, you're experiencing an issue where the video continues playing in the background when you switch to or focus on another browser tab or window. Is that correct?

    • JeevanKadam's avatar
      JeevanKadam
      Community Member

      Hi Nedim,

      how to run articulate published course, if window is switched off automatically.

       

  • Hi Nedim, yes video continues when switching to another browser or window.  

    I've repeated the same test a few times now on a copy of a .story file that was working, by changing 11 slides from Resume Saved State to Automatically Decide; then Saved, then uploaded to LMS - it failed and continued playing the video when I switched windows.  So then I changed the same 11 slides from Automatically Decide back to Resume Saved State, and Saved, then uploaded to LMS.  It failed again.

  • are the videos integrated directly into the course or do you use "video from website" ?

    is the course running in lms in an iframe - do you see buttons or other decorations around the storyline course in the same browser tab?

    • Jürgen_Schoene_'s avatar
      Jürgen_Schoene_
      Community Member

      one extra question - are you talking about the media element video or normal slides in which only images and graphics are integrated?

  • I've been doing tonnes of testing and have success.  Basically, I have 2 laptops... one has had the recent Storyline updates applied and the other hasn't.  The one that has had the updates, is the one that is causing the problem, and the one that hasn't had the updates works perfectly fine and pauses the videos if moved away from the window.

    • Jürgen_Schoene_'s avatar
      Jürgen_Schoene_
      Community Member

      congratulations on isolating the problem - which SL version was the version that still worked?

  • Nedim's avatar
    Nedim
    Community Member

    Is there any difference in how video plays between Firefox and Google Chrome, regardless of the SL version? Or does video playback only pause in Firefox, while continuing in Chrome? I've found that this behavior is mainly managed by browsers, regardless of the SL version.

    • SusanLythe-a3d2's avatar
      SusanLythe-a3d2
      Community Member

      Chrome is our default browser; and I'm using adaptive video publish setting

  • Nedim's avatar
    Nedim
    Community Member

    Switch to the static video publishing setting. If the problem persists after making this change, try running the JavaScript code below using an 'Execute JavaScript' trigger when the timeline starts on this slide. Does it make any difference?

    let video = document.querySelector('video');
    document.addEventListener("visibilitychange", () => {
      const { visibilityState } = document;
      if (visibilityState === 'visible') {
        video.play();
      } else {
        video.pause();
      }
    });