You are here

function video_web_extensions in Video 6.5

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

Compares passed extensions with normal video web extensions.

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 492
Common Video module 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;
}