Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Filepicker.io - video/* mimetype does not work in Chrome

I've recently noticed a weirdness in Chrome where .mov files aren't being recognized as valid video files when picking. The following JSFiddle illustrates my point

http://jsfiddle.net/6aJBM/

You'll need to change the API key obviously. If open the above JSFiddle in Firefox, you can select both images and videos from the filesystem. If on the other hand you open it in Chrome, .mov files will be greyed out and therefore non-selectable. It seems like .mov files aren't registering as video files in Chrome. Has anyone ran into this issue?

like image 511
Bart Jedrocha Avatar asked Jan 15 '13 02:01

Bart Jedrocha


2 Answers

This is really silly, but if you replace video/* with:

video/avi, video/quicktime, video/mpeg, video/mp4, video/ogg, 
video/webm, video/x-ms-wmv, video/x-flv, video/x-matroska,
video/x-msvideo, video/x-dv

That will do the trick.

There's a odd bug/feature in Chrome that doesn't allow .mov to be selected. I'll have to look it up again, but iirc, chrome's behavior is considered strict, to the letter, compliance with the spec.

like image 137
Liyan Chang Avatar answered Oct 24 '22 17:10

Liyan Chang


On the Filepicker blog they suggested using the extensions filter instead of mimetypes.

var acceptedExtensions = [
  '3g2','3gp','3gp2','3gpp','3gpp2','aac','ac3','eac3','ec3','f4a',
  'f4b','f4v','flv','highwinds','m4a','m4b','m4r','m4v','mkv','mov',
  'mp3','mp4','oga','ogg','ogv','ogx','ts','webm','wma','wmv'
];
filepicker.pickAndStore({extensions: acceptedExtensions},...
like image 36
forresto Avatar answered Oct 24 '22 18:10

forresto