function mediafront_is_media in MediaFront 7
Same name and namespace in other branches
- 6.2 mediafront.module \mediafront_is_media()
- 6 mediafront.module \mediafront_is_media()
Checks to see if a file is a media file.
2 calls to mediafront_is_media()
- mediafront_get_media_file in ./
mediafront.module - Given a Drupal file object, this function returns the media player file object.
- mediafront_get_media_preview in ./
mediafront.module - Returns the image path for a media object.
File
- ./
mediafront.module, line 657
Code
function mediafront_is_media($mimetype, $extension) {
if (in_array(substr($mimetype, 0, 5), array(
'video',
'audio',
))) {
return true;
}
$media = in_array($extension, array(
'swf',
'mov',
'mp4',
'mp3',
'm4v',
'flv',
'f4v',
'ogg',
'oga',
'ogv',
'3g2',
'wav',
'aif',
'm4a',
'aac',
'wma',
'webm',
));
return $media;
}