X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fvideojs%2Fvideojs.install;fp=web%2Fmodules%2Fcontrib%2Fvideojs%2Fvideojs.install;h=61497173b7d10ac9ac5e4e674047923da7b0eaaf;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/web/modules/contrib/videojs/videojs.install b/web/modules/contrib/videojs/videojs.install new file mode 100644 index 000000000..61497173b --- /dev/null +++ b/web/modules/contrib/videojs/videojs.install @@ -0,0 +1,35 @@ +get('videojs_directory'); + + if ($phase == 'runtime') { + $requirements['videojs']['title'] = t('Video.js'); + $videojs_version = videojs_get_version(); + if ($videojs_version == NULL) { + $requirements['videojs']['value'] = t('Not found'); + $requirements['videojs']['description'] = t('Missing the Video.js library. Please download Video.js and extract it into the %directory directory.', array('!url' => 'http://videojs.com', '%directory' => $directory)); + $requirements['videojs']['severity'] = REQUIREMENT_ERROR; + } + elseif (version_compare($videojs_version, '5', '<')) { + $requirements['videojs']['value'] = t('Unsupported Video.js version @version', array('@version' => $videojs_version)); + $requirements['videojs']['description'] = t('The installed version of the Video.js library is not supported. This version of the Video.js module only supports Video.js version 5. Download Video.js version 5 and extract it into the %directory directory or download Video.js module version 7.x-2.x to use Video.js 3.', array('@videojs-url' => 'http://videojs.com', '%directory' => $directory, '@videojs-module-url' => 'http://drupal.org/project/videojs')); + $requirements['videojs']['severity'] = REQUIREMENT_ERROR; + } + else { + $requirements['videojs']['value'] = $videojs_version; + $requirements['videojs']['severity'] = REQUIREMENT_OK; + } + } + + return $requirements; +}