Forum Discussion
How do I disable accessibility buttons in video controls on Storyline 360
This can only be accomplished with JavaScript. Some might suggest overlaying a 99% transparent shape over the video to prevent accidental clicks on the controls. Personally, I would hide the control icons, as they serve no purpose if they are not clickable or if they are simply blocked by something else.
Hello Nedim,
What JavaScript commands did you use to hide the Fullscreen and the PIP controls?
Thanks....Gary
- Nedim4 months agoCommunity Member
This code will hide both the Fullscreen and PiP controls:
const controls = document.querySelectorAll('.video-full-screen, .video-pip'); controls.forEach(control => control.style.display = 'none');
Note: hiding the PiP control in Firefox may not work as intended. Firefox forces the PiP button to appear on videos longer than 45 seconds, even if display: none; is applied via CSS or JavaScript. If this is a case, try adding this code to above script:
var video = document.getElementsByTagName('video')[0]; video.disablePictureInPicture = true;
- GaryOvergaard14 months agoCommunity Member
Thanks so much Nedim! That worked perfectly.
- shivapalani2 months agoCommunity Member
Hi Nedim,
This code will hide both the Fullscreen and PiP controls
const controls = document.querySelectorAll('.video-full-screen, .video-pip'); controls.forEach(control => control.style.display = 'none');
But, In same query not works in viedeo timeline {display: none;} ?