Fix for potential issue with .tagName

This commit is contained in:
Sam Potts 2015-03-09 11:51:01 +11:00
parent 1532f2ab23
commit ae5a816df1
2 changed files with 3 additions and 3 deletions

2
dist/plyr.js vendored

File diff suppressed because one or more lines are too long

View File

@ -644,7 +644,7 @@
player.media.removeAttribute("controls");
// Set media type
player.type = (player.media.tagName == "VIDEO" ? "video" : "audio");
player.type = player.media.tagName.toLowerCase();
// Add type class
_toggleClass(player.container, config.classes[player.type], true);
@ -1357,7 +1357,7 @@
// Disabled for <video> for iPhone
// Since it doesn't allow customisation
if (element.querySelectorAll("audio, video")[0].tagName === "VIDEO"
if (element.querySelectorAll("audio, video")[0].tagName.toLowerCase() === "video"
&& /iPhone/i.test(navigator.userAgent)) {
continue;
}