Closed sbrl closed 8 years ago
Link to HTML5 audio/video support tables: http://caniuse.com/#feat=video http://caniuse.com/#feat=audio
I have enabled the uploading of more file types. The next step will be to generate a preview for them all.
I think the first step will be to migrate over to using imagemagick for preview generation. This will instantly add support for way more file types.
We can then worry about video / audio preview generation later.
We have now switched to using imagick, and have (untested) etags to speed up subsequent requests.
It looks like video and audio preview generation is relatively tough to do reliably, so we should stick with sending the appropriate HTML5 code to play them in the browser.
We now have both video and audio previews online using the HTML5 <video>
and <audio>
tags! It currently doesn't check to make sure that the target browser does actually support the video / audio type that has been uploaded though.
Uploading images is great, but more file types would be nice. The problem is security though. How do we make sure that a malicious file isn't uploaded by accident?
Should we just warn users about this?
How should we deal with security here?
The other thing we should consider here is preview generation. We might want to open an issue for each different file type/class though and deal with them one at a time.
The obvious files that would benefit from preview generation are videos, but maybe we would want to embed a HTML5 video player instead if the browser supports the file type in question?
We might be able to take a similar approach with audio files - generate a preview of the waveform if the browser doesn't support the file type, and display an HTML5 audio player if the browser does.
PDFs might be a good candidate for preview generation, too - in fact we could use imagemagick to extract the first page as an image and send it to the user.