if(userAgent.indexOf("msie") > -1)
will no longer do the job in IE11 because the user agent string has changed. For IE11, you have to look for Trident
.
MediaElement.js worked around this like so:
t.isIE = (nav.appName.match(/microsoft/gi) !== null) || (ua.match(/trident/gi) !== null);
So I guess this might do the trick for you?
else if(userAgent.indexOf("msie") > -1 || userAgent.indexOf("trident") > -1) return "ie";