I want to check if a certain file is playable by the browser.
Right now, I'm doing this:
$playable = ['image/png', 'image/jpeg' ... 'video/mp4' ...];
if (isset($playable[mime_content_type($file)])) {
// file is playable
}
Is there a better way to do this? Maybe a list of MIME-types which are playable by modern browsers?