function getTypeFromFile (url) {

	if (typeof url !== 'string') {
		throw new Error('`url` argument must be a string');
	}

	for (let i = 0, total = typeChecks.length; i < total; i++) {
		const type = typeChecks[i](url);

		if (type) {
			return type;
		}
	}

	const
		ext = getExtension(url),
		normalizedExt = normalizeExtension(ext)
	;

	let mime = 'video/mp4';

	// Obtain correct MIME types
	if (normalizedExt) {
		if (~['mp4', 'm4v', 'ogg', 'ogv', 'webm', 'mpeg'].indexOf(normalizedExt)) {
			mime = `video/${normalizedExt}`;
		} else if ('mov' === normalizedExt) {
			mime = 'video/quicktime';
		} else if (~['mp3', 'oga', 'wav', 'mid', 'midi'].indexOf(normalizedExt)) {
			mime = `audio/${normalizedExt}`;
		}
	}

	return mime;
}
Get the type of media based on URL structure

@param {String} url
@return {String}