chunks
1 week ago
vendor
8 months ago
admin.build.js
1 week ago
admin.js
3 months ago
analytics-tracker.js
4 weeks ago
analytics.build.js
1 week ago
blocks.build.js
1 week ago
carousel.js
1 year ago
custom-player.build.js
1 week ago
documents-viewer-script.js
3 months ago
ep-pdf-lightbox.js
3 months ago
ep-view-count.js
1 week ago
ep-yt-queue.js
4 weeks ago
feature-notices.js
7 months ago
front.js
4 weeks ago
frontend.build.js
3 months ago
gallery-justify.js
1 week ago
gutneberg-script.js
2 months ago
index.html
7 years ago
initCarousel.js
2 years ago
initplyr.js
2 months ago
instafeed.js
4 weeks ago
instagram-shortcode-generator.js
1 month ago
lazy-load.js
6 months ago
license.js
3 months ago
meetup-timezone.js
3 months ago
onboarding.build.js
1 week ago
pdf-gallery-elementor-editor.js
3 months ago
pdf-gallery.js
3 months ago
preview.js
8 months ago
settings.js
3 months ago
sponsored.js
9 months ago
gutneberg-script.js
39 lines
| 1 | function handlePosterImageLoad() { |
| 2 | wp.data.subscribe(() => { |
| 3 | var posterImages = document.querySelectorAll(".plyr__poster"); |
| 4 | var videoWrappers = document.querySelectorAll("[data-playerid]"); |
| 5 | |
| 6 | // Iterate over each posterImage |
| 7 | posterImages.forEach(function (posterImage) { |
| 8 | if (posterImage) { |
| 9 | var observer = new MutationObserver(function (mutationsList, observer) { |
| 10 | var posterImageStyle = window.getComputedStyle(posterImage); |
| 11 | if (posterImageStyle.getPropertyValue('background-image') !== 'none') { |
| 12 | setTimeout(function () { |
| 13 | // Find the wrapper that owns this poster — `videoWrapper` |
| 14 | // was a stale reference that threw ReferenceError. |
| 15 | var wrap = posterImage.closest('[data-playerid]'); |
| 16 | if (wrap) wrap.style.opacity = "1"; |
| 17 | }, 200); |
| 18 | observer.disconnect(); |
| 19 | } |
| 20 | }); |
| 21 | |
| 22 | observer.observe(posterImage, { |
| 23 | attributes: true, |
| 24 | attributeFilter: ['style'] |
| 25 | }); |
| 26 | } |
| 27 | }); |
| 28 | |
| 29 | // Iterate over each videoWrapper |
| 30 | videoWrappers.forEach(function (videoWrapper) { |
| 31 | if (videoWrapper && posterImages.length > 0) { |
| 32 | videoWrapper.style.opacity = "1"; |
| 33 | } |
| 34 | }); |
| 35 | }); |
| 36 | } |
| 37 | |
| 38 | document.addEventListener("DOMContentLoaded", handlePosterImageLoad); |
| 39 |