You are here

function video_web_extensions in Video 6.4

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

Compares passed extensions with normal video web extensions.

Parameters

string $ext:

Return value

bool

2 calls to video_web_extensions()
uploadfield_widget_settings_validate in types/uploadfield/uploadfield_widget.inc
Implementation of CCK's hook_widget_settings($op = 'validate').
videoftp_widget_settings_validate in types/videoftp/videoftp_widget.inc
Implementation of CCK's hook_widget_settings($op = 'validate').

File

./video_widget.inc, line 438
Common widget functions

Code

function video_web_extensions($ext) {
  $extensions = array_filter(explode(' ', $ext));
  $web_extensions = array(
    'mov',
    'mp4',
    '3gp',
    '3g2',
    'mpg',
    'mpeg',
    'm4v',
    // 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',
  );
  return count(array_diff($extensions, $web_extensions)) == 0;
}