diff options
author | Heshan <heshan@heidisoft.com> | 2011-04-06 21:47:46 +0530 |
---|---|---|
committer | Heshan <heshan@heidisoft.com> | 2011-04-06 21:47:46 +0530 |
commit | 0ce24fea04b8b571ef887d184a7f8cdeca2d4c4a (patch) | |
tree | d07484b2f7e7de07fe2fec0a27198a6857bc629f /video.module | |
parent | 33aed9a2bc33078ffd2ba46d2e77ac78de187512 (diff) | |
download | video-0ce24fea04b8b571ef887d184a7f8cdeca2d4c4a.tar.gz video-0ce24fea04b8b571ef887d184a7f8cdeca2d4c4a.tar.bz2 |
#1092668 by anglo VideoJS player
Diffstat (limited to 'video.module')
-rw-r--r-- | video.module | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/video.module b/video.module index 5a6c5a2..8b344c4 100644 --- a/video.module +++ b/video.module @@ -102,6 +102,10 @@ function video_theme() { 'variables' => array('video' => NULL), 'file' => 'video.theme.inc' ); + $theme['video_html5'] = array( + 'variables' => array('video' => NULL), + 'file' => 'video.theme.inc' + ); return $theme; } @@ -524,6 +528,21 @@ function video_video_flv_players() { return $options; } +/* + * Return our possible flash players. + */ + +function video_video_html5_players() { + $options = array(); + if (module_exists('videojs')) { + $options['videojs'] = t('VideoJS'); + } + if (module_exists('video')) { + $options['video'] = t('Default HTML5'); + } + return $options; +} + /** * Field instances settings * @param <type> $widget @@ -629,7 +648,7 @@ function video_format_right($value) { */ function video_default_dimensions() { - return "176x144\n352x288\n704x576\n1408x1152\n128x96\n160x120\n320x240\n640x480\n800x600\n1024x768\n1600x1200\n2048x1024\n1280x1024\n2560x2048\n5120x4096\n852x480\n1366x768\n1600x1024\n1920x1200\n2560x1600\n3200x2048\n3840x2400\n6400x4096\n7680x4800\n320x200\n640x350\n852x480\n1280x720\n1920x1080"; + return "176x144\n352x288\n704x576\n1408x1152\n128x96\n160x120\n320x240\n640x480\n800x600\n1024x768\n1600x1200\n2048x1024\n1280x1024\n2560x2048\n5120x4096\n852x480\n1366x768\n1600x1024\n1920x1200\n2560x1600\n3200x2048\n3840x2400\n6400x4096\n7680x4800\n320x200\n640x350\n852x480\n1280x720\n1920x1080\n640x360\n320x180"; } /* @@ -657,4 +676,18 @@ function video_features_api() { 'file' => drupal_get_path('module', 'video') . '/video.features.inc', ), ); +} + +/** + * Helper funcations + */ +function _video_object_to_array($data) { + if (is_array($data) || is_object($data)) { + $result = array(); + foreach ($data as $key => $value) { + $result[$key] = _video_object_to_array($value); + } + return $result; + } + return $data; }
\ No newline at end of file |