Merge pull request #1651 from pateljannat/issues-123

fix: vimeo video embed with plyr
This commit is contained in:
Jannat Patel
2025-07-23 11:00:03 +05:30
committed by GitHub

View File

@@ -551,11 +551,10 @@ export const enablePlyr = async () => {
const wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms)) const wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms))
const setupPlyrForVideo = (video, players) => { const setupPlyrForVideo = (video, players) => {
const src = video.getAttribute('src') || video.getAttribute('data-src') const src = video.getAttribute('src')
if (src) { if (src) {
const videoID = extractYouTubeId(src) const videoID = extractYouTubeId(src)
video.setAttribute('data-plyr-provider', 'youtube')
video.setAttribute('data-plyr-embed-id', videoID) video.setAttribute('data-plyr-embed-id', videoID)
} }