diff options
author | Sam Potts <me@sampotts.me> | 2015-03-09 11:51:01 +1100 |
---|---|---|
committer | Sam Potts <me@sampotts.me> | 2015-03-09 11:51:01 +1100 |
commit | ae5a816df1a8d16ecb75a48c028ff89f69400865 (patch) | |
tree | 1dbd58ae8bda91903d93b779745494f9b8bcf35a /src/js/plyr.js | |
parent | 1532f2ab2366965ceab6193df06ba8cd381f4cc3 (diff) | |
download | plyr-ae5a816df1a8d16ecb75a48c028ff89f69400865.tar.lz plyr-ae5a816df1a8d16ecb75a48c028ff89f69400865.tar.xz plyr-ae5a816df1a8d16ecb75a48c028ff89f69400865.zip |
Fix for potential issue with .tagName
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r-- | src/js/plyr.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js index 90ef2d8e..0b9dbf77 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -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; } |