this is really an issue for the JQuery Media plugin, but there's nowhere to post problems on their site, so i mention it here.
suppose you want to play a file ending with .WAV. since only lower case extensions are registered in jquery.media.js, you might try:
$.fn.media.mapFormat('WAV','quicktime');
alas, this will have no effect because of
format = format.toLowerCase();
within mapFormat.
one could fix this by making various changes to jquery.media.js. disallowing filenames with uppercase extensions doesn't seem ideal.
071003a.wav
Comments
Comment #1
heacu commentedincidentally my patch was to add the following line within the for loop in getTypesRegExp() in jquery.media.js:
types += $.fn.media.defaults.players[player].types.toUpperCase();
note also that mapFormat(format, player) doesn't actually work if you are ADDING a new format that isn't already registered (e.g. m1v). in the following code from jquery.media.js
$.fn.media.mapFormat = function(format, player) {
if (!format || !player || !$.fn.media.defaults.players[player]) return; // invalid
format = format.toLowerCase();
if (isDigit(format[0])) format = 'fn' + format;
$.fn.media[format] = $.fn.media[player];
$.fn.media[format+'_player'] = $.fn.media.defaults.players[player];
};
nothing is added to $.fn.media.defaults.players[player].types, so the regular expression from getTypesRegExp() will not produce a match. this requires another patch!
Comment #2
munzirtaha commentedWhy is this restriction on the file names? This would prevent us from uploading files with Arabic names e.g.