Prevent multiple instances on one element
This commit is contained in:
parent
c7c48bbe3c
commit
aa39aa8a58
@ -967,9 +967,11 @@
|
||||
for (var i = elements.length - 1; i >= 0; i--) {
|
||||
// Get the current element
|
||||
var element = elements[i];
|
||||
|
||||
|
||||
// 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
|
||||
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