Forum Discussion
SusanLythe-a3d2
2 years agoCommunity Member
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...
Nedim
2 years agoCommunity 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();
}
});
Related Content
- 4 days ago
- 12 months ago
- 8 months ago
- 5 months ago