Prevent multiple instances on one element

This commit is contained in:
Sam Potts 2015-02-18 16:17:27 +11:00
parent c7c48bbe3c
commit aa39aa8a58
2 changed files with 5 additions and 3 deletions

View File

@ -969,7 +969,9 @@
var element = elements[i];
// Setup a player instance and add to the 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

File diff suppressed because one or more lines are too long