After some back and forth, because some videos were playing, found that at least some of the problematic videos were embedded with H5P - mod_hvp in Moodle.
For the videos embedded using h5p - those videos which have mod/hvp in their URLs, the solution for this problem, as we have seen in the earlier post about this issue, is to upgrade the HVP libraries.
For the videos which are on one of the instances, we had gone through the process of upgrading the mod_hvp video libraries - as in the post linked above. Completed the same procedure for the three other instances for all the hvp embedded video content on those instances as well.
This seems to have solved the issue.
For the videos directly embedded, not using hvp, the video does play.
If for particular users it does not play, most probable reason could be blocking of third-party cookies or blocking of some elements in the embed code in their browser, which the step-by-step procedure given by Claude earlier (listed below in edited form) might help to catch.
1. Get exact symptoms from affected users - Ask whether they see a blank black box, an infinite spinner, a YouTube error message (e.g. "Video unavailable", "Playback on other websites has been disabled"), or nothing loads at all. Also get their browser, device, and whether they're on a school/work network or home network. This alone usually narrows it to one of the causes below.
2. Check third-party cookie and tracking-prevention settings - The video.js YouTube tech relies on the YouTube iframe API, which needs to communicate via cookies/postMessage. Safari's Intelligent Tracking Prevention, Firefox's Enhanced Tracking Protection (strict mode), Brave, and some corporate-managed Chrome profiles block third-party cookies by default, which can cause the embed to fail to initialize while the same page works fine for you if your browser allows third-party cookies or you're signed into Google.
3. Check browser console for errors on an affected user's machine - Open DevTools > Console while loading the page. Look for postMessage origin errors, blocked-by-client warnings (ad blockers), or CSP errors. The embed URL includes an explicit origin parameter (https://ourdomain.org) — if a user somehow reaches the page via a different hostname (e.g. http vs https, or a proxy/CDN mirror), this mismatch can silently break the YouTube iframe API handshake.
4. Rule out ad blockers and browser extensions - Ad blockers, privacy extensions (uBlock Origin, Privacy Badger, etc.), and some antivirus "web protection" modules commonly block YouTube's embed script or iframe outright. Have the affected user try in an incognito/private window with extensions disabled.
No comments:
Post a Comment