You are here

function video_web_extensions in Video 7

Same name and namespace in other branches
  1. 6.5 video_widget.inc \video_web_extensions()
  2. 6.4 video_widget.inc \video_web_extensions()

Compares passed extensions with normal video web extensions.

File

./video.module, line 243

Code

function video_web_extensions($ext) {
  $extensions = array_filter(explode(' ', $ext));
  $web_extensions = array(
    'mov',
    'mp4',
    '3gp',
    '3g2',
    'mpg',
    'mpeg',
    // quicktime
    'divx',
    'mkv',
    //divx
    'rm',
    // realplayer
    'flv',
    'f4v',
    //flash player
    'swf',
    // swf player
    'dir',
    'dcr',
    // dcr player
    'asf',
    'wmv',
    'avi',
    'mpg',
    'mpeg',
    // windows media
    'ogg',
    'ogv',
    'webm',
  );
  if (count(array_diff($extensions, $web_extensions))) {
    return FALSE;
  }
  return TRUE;
}