fluid-player / fluid-player

Fluid Player - an open source VAST compliant HTML5 video player
https://fluidplayer.com
MIT License
809 stars 356 forks source link

Got a error tip "Invalid initializer - player target already is initialized" #834

Open andyzhou opened 1 week ago

andyzhou commented 1 week ago

I use fluid 3.29 as video player in the html page, init multi unique players on same page, setup unique video id per video div.

some time i got the follow error tip in the browser console:

"Invalid initializer - player target already is initialized", this is happened on follow js code

if (o.classList.contains("js-fluid-player")) throw "Invalid initializer - player target already is initialized";

Can u guys help me, thanks.

ZentoDH commented 4 days ago

Hi @andyzhou thanks for using Fluid Player! Normally this error happens if you have used an ID more than once. For every new instance you make, you need to give it a different ID.