function mediafront_is_media in MediaFront 6
Same name and namespace in other branches
- 6.2 mediafront.module \mediafront_is_media()
- 7 mediafront.module \mediafront_is_media()
Checks to see if a file is a media file.
1 call to mediafront_is_media()
- mediafront_get_media_file in ./
mediafront.module - Given a Drupal file object, this function returns the media player file object.
File
- ./
mediafront.module, line 712
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;
}