Tools

JS Get Media Mimetype From Url

Little function to grab the mime type from a video url, using it in one of my apps will continue to add to it. function getMimeType(url) { var ext = url.split(/[#?]/)[0].split('.').pop().trim(); switch (ext) { case 'mp4': return 'video/mp4' break; case 'mov': return 'video/quicktime' break; case 'flv': return 'video/x-flv' break; case...