MAC1 Posted January 30 Posted January 30 Hi, How would i disable the "picture in picture" icon on the video background on my home page? is this possible? searched for hours with no answer. certain browsers display it and throws out the design + don't want anyone playing/breaking the website this way. web: https://ellipse-teal-dl5w.squarespace.com/ pass: 04
tuanphan Posted February 1 Posted February 1 It looks like you figured it out? It doesn't show to me (Windows/Chrome) Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
MAC1 Posted February 1 Author Posted February 1 (edited) I'm using firefox to find the issue on my device windows. But its happening on a few MAC devices with safari also. Chrome windows seems fine now which is great. Just wondering if its possible to make sure there is a hard lock on the PIP for other devices. Any way to target the PIP with css etc? Cheers Edited February 1 by MAC1
MAC1 Posted February 18 Author Posted February 18 I tried javascript code injection into the footer, it doesn't work but is this close or help find a answer? <!-- PIP FIX --> <script> document.addEventListener('DOMContentLoaded', function() { var sectionId = '64d255619ec2f716e2c78975'; var section = document.querySelector('[data-section-id="' + sectionId + '"]'); if (section) { var videos = section.querySelectorAll('video'); videos.forEach(function(video) { video.addEventListener('enterpictureinpicture', function(event) { event.preventDefault(); // Prevent entering PiP mode }); video.addEventListener('leavepictureinpicture', function(event) { // Handle events when leaving PiP mode if needed }); }); } }); </script> <!-- end PIP FIX -->
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment