Skip to content
This repository has been archived by the owner on Jan 8, 2021. It is now read-only.

Commit

Permalink
Merge pull request mediaelement#801 from jbdemonte/master
Browse files Browse the repository at this point in the history
fix type resolution when extension is uppercased
  • Loading branch information
johndyer committed Apr 10, 2013
2 parents 7978693 + 36605b9 commit 1ebb8cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/js/me-i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,11 @@
* me-i18n-locale.js
*
* @params
* - $ - zepto || jQuery ..
* - context - document, iframe ..
* - exports - CommonJS, window ..
*
*/
;(function($, context, exports, undefined) {
;(function(context, exports, undefined) {
"use strict";
var i18n = {
"locale": {
Expand Down Expand Up @@ -192,4 +191,4 @@

// end i18n
exports.i18n = i18n;
}(jQuery, document, mejs));
}(document, mejs));
2 changes: 1 addition & 1 deletion src/js/me-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ mejs.HtmlMediaElementShim = {

getTypeFromFile: function(url) {
url = url.split('?')[0];
var ext = url.substring(url.lastIndexOf('.') + 1);
var ext = url.substring(url.lastIndexOf('.') + 1).toLowerCase();
return (/(mp4|m4v|ogg|ogv|webm|webmv|flv|wmv|mpeg|mov)/gi.test(ext) ? 'video' : 'audio') + '/' + this.getTypeFromExtension(ext);
},

Expand Down

0 comments on commit 1ebb8cb

Please sign in to comment.