diff options
-rw-r--r-- | includes/common.inc | 6 | ||||
-rw-r--r-- | video.module | 10 |
2 files changed, 11 insertions, 5 deletions
diff --git a/includes/common.inc b/includes/common.inc index 18b8925..8b24d3d 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -246,7 +246,7 @@ data="'. $url .'"> // params will be passed to both IE or not IE browsers $output .= '<param name="src" value="'. $url .'" /> - <param name="AUTOPLAY" value="true" /> + <param name="AUTOPLAY" value="'.variable_get('video_autoplay', TRUE) ? 'true' : 'false'.'" /> <param name="KIOSKMODE" value="false" />' . "\n" . _video_get_parameters($node) . '<p>'. t('Your browser is not able to display this multimedia content.') .'</p> @@ -298,7 +298,7 @@ classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" > $output .= '<param name="src" value="'. $url .'" /> <param name="_ExtentX" value="7276" /> <param name="" value="3307" /> - <param name="AUTOSTART" value="true" /> + <param name="AUTOSTART" value="'.variable_get('video_autoplay', TRUE) ? 'true' : 'false'.'" /> <param name="SHUFFLE" value="0" /> <param name="PREFETCH" value="0" /> <param name="NOLABELS" value="0" /> @@ -351,7 +351,7 @@ classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" > <param name="URL" value="'.$url.'" /> <param name="animationatStart" value="true" /> <param name="transparentatStart" value="true" /> - <param name="autoStart" value="true" /> + <param name="autoStart" value="'.variable_get('video_autoplay', TRUE) ? 'true' : 'false'.'" /> <param name="showControls" value="true" /> <param name="loop" value="true" />' . _video_get_parameters($node) . diff --git a/video.module b/video.module index 6f079fd..dd0dd8e 100644 --- a/video.module +++ b/video.module @@ -282,14 +282,20 @@ function video_settings_form() { '#default_value' => variable_get('video_displayfilesize', 1), '#description' => t('Toggle the display of the filesize for a video.') ); - + $form['menu']['video_autoplay'] = array( + '#type' => 'checkbox', + '#title' => t('Automatically start video on page load'), + '#default_value' => variable_get('video_autoplay', TRUE), + '#description' => t('Start the video when the page and video loads') + ); + $form['resolutions'] = array( '#type' => 'fieldset', '#title' => t('Video resolutions'), '#collapsible' => TRUE, '#collapsed' => TRUE ); - + $form['resolutions']["video_resolution_width"] = array( '#type' => 'textfield', '#title' => t("Default width"), |