Prevent multiple instances on one element
This commit is contained in:
parent
c7c48bbe3c
commit
aa39aa8a58
@ -969,7 +969,9 @@
|
|||||||
var element = elements[i];
|
var element = elements[i];
|
||||||
|
|
||||||
// Setup a player instance and add to the element
|
// Setup a player instance and add to the element
|
||||||
element.plyr = new Plyr(element);
|
if(typeof element.plyr === "undefined") {
|
||||||
|
element.plyr = new Plyr(element);
|
||||||
|
}
|
||||||
|
|
||||||
// Add to return array
|
// Add to return array
|
||||||
players.push(element.plyr);
|
players.push(element.plyr);
|
||||||
|
2
dist/js/plyr.js
vendored
2
dist/js/plyr.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user