src/components/video/zy.media.js
function getType(url, type) {
	// If no type is specified, try to get from the extension
	if (url && !type) {
		return getTypeFromFileExtension(url)
	} else {
		// Only return the mime part of the type in case the attribute contains the codec
		// see http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#the-source-element
		// `video/mp4; codecs="avc1.42E01E, mp4a.40.2"` becomes `video/mp4`
		if (type && ~type.indexOf(';')) {
			return type.substr(0, type.indexOf(';'))
		} else {
			return type
		}
	}
}
function getType(url, type) {
	// If no type is specified, try to get from the extension
	if (url && !type) {
		return getTypeFromFileExtension(url)
	} else {
		// Only return the mime part of the type in case the attribute contains the codec
		// see http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#the-source-element
		// `video/mp4; codecs="avc1.42E01E, mp4a.40.2"` becomes `video/mp4`
		if (type && ~type.indexOf(';')) {
			return type.substr(0, type.indexOf(';'))
		} else {
			return type
		}
	}
}
function getType ( url , type ) { // If no type is specified, try to get from the extension if ( url && ! type ) { return getTypeFromFileExtension ( url ) } else { // Only return the mime part of the type in case the attribute contains the codec // see http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#the-source-element // `video/mp4; codecs="avc1.42E01E, mp4a.40.2"` becomes `video/mp4` if ( type && ~ type . indexOf ( ';' ) ) { return type . substr ( 0 , type . indexOf ( ';' ) ) } else { return type } } }
Get media type
Get media type