Forum Discussion

PatrykRusin's avatar
PatrykRusin
Community Member
3 years ago

Disabling/Enabling Controls on

Hi Everyone!

I wanted to disable player controls during video slides (as those are already in-built in the video controls) and enable them when learners proceed or go back to previous slides.
I managed to disable it using a trigger with JavaScript 

var x = document.getElementById("misc-controls");
{x.style.display = "none";

}

and then enable them again when user clicks/swipes next/previous with another line:

var x = document.getElementById("misc-controls");
{x.style.display = "inline";

}

The problem is that it does not work when users use the ToC to move around the course.
Is there any way to do it with a single trigger on the video slide, or do I have to use the Execute JavaScript when the timeline starts on every single slide (or in Slide Master) other than the video ones?