Index: flowplayer3/swftools_flowplayer3.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/swftools/flowplayer3/swftools_flowplayer3.module,v retrieving revision 1.1.2.30 diff -u -r1.1.2.30 swftools_flowplayer3.module --- flowplayer3/swftools_flowplayer3.module 14 Apr 2010 22:13:39 -0000 1.1.2.30 +++ flowplayer3/swftools_flowplayer3.module 6 Mar 2011 18:17:36 -0000 @@ -26,6 +26,11 @@ define('SWFTOOLS_FLOWPLAYER3_PLAYLIST_JAVASCRIPT', 'flowplayer.playlist-3.0.7.min.js'); /** + * The default name of the FlowPlayer3 JavaScript ipad file. + */ +define('SWFTOOLS_FLOWPLAYER3_IPAD_JAVASCRIPT', 'flowplayer.ipad-3.2.1.min.js'); + +/** * Implementation of hook_swftools_methods(). */ function swftools_flowplayer3_swftools_methods() { @@ -535,16 +540,23 @@ // Rather than add each script separately with drupal_add_js build an array and then collapse it and add once $script = array(); + // Add variable for special plugins JavaScript to be attached to the end of the FlowPlayer function call + $plugins = ''; + if (variable_get('swftools_flowplayer3_ipad', TRUE)) { + $plugins = '.ipad()'; + } + // Provision ready for later to add some JavaScript immediately after FlowPlayer embedding $post_js = ''; // Script to add player instance - $script[] = t('flowplayer("!id", !url, !config); + $script[] = t('flowplayer("!id", !url, !config)!plugins; !post_js ', array( '!id' => $data['othervars']['id'], '!url' => $parameters, '!config' => $config, + '!plugins' => $plugins, '!post_js' => $post_js, )); @@ -613,6 +625,11 @@ drupal_add_js(SWFTOOLS_LIBRARIES . 'flowplayer3/' . variable_get('swftools_flowplayer3_playlist_javascript', SWFTOOLS_FLOWPLAYER3_PLAYLIST_JAVASCRIPT)); } + // Add flowplayer3 ipad script if feature is enabled + if (variable_get('swftools_flowplayer3_ipad', FALSE)) { + drupal_add_js(SWFTOOLS_LIBRARIES . 'flowplayer3/' . variable_get('swftools_flowplayer3_ipad_javascript', SWFTOOLS_FLOWPLAYER3_IPAD_JAVASCRIPT)); + } + } } Index: flowplayer3/swftools_flowplayer3.admin.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/swftools/flowplayer3/swftools_flowplayer3.admin.inc,v retrieving revision 1.1.2.10 diff -u -r1.1.2.10 swftools_flowplayer3.admin.inc --- flowplayer3/swftools_flowplayer3.admin.inc 4 Apr 2010 23:36:21 -0000 1.1.2.10 +++ flowplayer3/swftools_flowplayer3.admin.inc 6 Mar 2011 18:17:35 -0000 @@ -60,6 +60,14 @@ '#size' => 50, ); + $form['swftools_flowplayer3_files']['swftools_flowplayer3_ipad_javascript'] = array( + '#type' => 'textfield', + '#default_value' => variable_get('swftools_flowplayer3_ipad_javascript', SWFTOOLS_FLOWPLAYER3_IPAD_JAVASCRIPT), + '#title' => t('iPad script'), + '#description' => t('The path to the FlowPlayer3 iPad script which is used to enable iPad support.'), + '#size' => 50, + ); + $form['swftools_flowplayer3_files']['swftools_flowplayer3_product_key'] = array( '#type' => 'textfield', '#default_value' => variable_get('swftools_flowplayer3_product_key', ''), @@ -97,6 +105,13 @@ '#description' => t('If checked then a simple HTML list will be output beneath players that have been given a playlist. This feature is experimental and the output is not yet themeable'), ); + $form['swftools_flowplayer3_embedding']['swftools_flowplayer3_ipad'] = array( + '#type' => 'checkbox', + '#default_value' => variable_get('swftools_flowplayer3_ipad', FALSE), + '#title' => t('Enable iPad support (experimental)'), + '#description' => t('If checked then a iPad support will be enabled. This feature is experimental and the output is not yet themeable'), + ); + // Add custom form handler to flush cache upon submit $form['#submit'][] = 'swftools_admin_settings_submit';