Forum Discussion
BarbaraJacobs-1
9 months agoCommunity Member
Turn OFF Picture-in-Picture using JavaScript
We need to turn off picture-in-picture for videos. I found this online, but I need to know how to work this for Storyline videos (not iframes). Can this work in Storyline? How would I post the sou...
stephanefedou-4
8 months agoCommunity Member
Try this on start chrono :
// Sélectionne toutes les balises vidéo sur la page
const videos = document.querySelectorAll('video');
// Boucle à travers chaque vidéo
videos.forEach(video => {
// Désactive la fonctionnalité "Picture in Picture"
video.disablePictureInPicture = true;
});
- BarbaraJacobs-17 months agoCommunity Member
Thank you, Stephane! It is simpler. I'll give it a try! So far, using a screen combined with JavaScript is keeping (discouraging) learners from selecting the option for full screen available from within the browser. This does not address those who can use a keyboard to bypass the option.