sampotts / plyr

A simple HTML5, YouTube and Vimeo player
https://plyr.io
MIT License
26.56k stars 2.93k forks source link

Problems with multiple YouTube embeds in the same page (please help) #2525

Open pcintav opened 2 years ago

pcintav commented 2 years ago

Expected behaviour

The PLYR player should be in every embeded YouTube video.

Actual behaviour

But in this case, the PLYR player only showed up (run well) on the latest embeded video (posted by user). The old embeded YouTube video will loosing its PLR player, after some one posted new URL YouTube, so it becomes just ordinary YouTube embed. bhalpa1

If I inspect the old YouTube embed, I think it is not rendering anymore the PLYR code. bhalpa2

Steps to reproduce

Environment

Console errors (if any)

No error

Link to where the bug is happening

You can check here: https://bhalpa.hostku.xyz/Admin

MichelGeorgesNajarian commented 1 year ago

You have the same id for every video (every single one of your videos has the id player. An id should be unique per page and that's why only one of them is showing up correctly