I cannot figure out how to disable autoplay with quicktime video (.mov).

I tried to insert a custom param tag with the Video Params module but that doesn't work. It inserts the tag properly, but I guess the other one that is already set to autoplay=true overrides it.

i would appreciate any ideas and advice on how to overcome this.

Thanks,
Rene

Comments

fax8’s picture

hi, you might try to override the theme function which render the player and substitute the param with autoplay=false.

you can find more informations on overriding theme functions on the phptemplate theming handbook.

Let me know if you still needs help.

rhache’s picture

I know how to do theme overrides, except I can see any way to do that with the video modules. I would need some more details on how to actually go about doing that.

Thanks,
Rene

fax8’s picture

The function you have to override is the theme_video_play_quicktime.


function theme_video_play_quicktime($node) {
  //Increase the height to accommodate the player controls on the bottom.
  $height = $node->video_scaled_y + 16;

  $url = _video_get_fileurl($node->vidfile);


  // this will be executed by not Internet Explorer browsers
  $output = '<!--[if !IE]> <-->
<object type="video/quicktime" width="'. $node->video_scaled_x .'" height="'. $height .'"
data="'. $url .'">
<!--> <![endif]-->' . "\n";

  // this will be executed by Internet Explorer
  $output .= '<!--[if IE]>
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="'. $node->video_scaled_x .'" height="'. $height .'" scale="tofit" >
<![endif]-->' . "\n";

  // params will be passed to both IE or not IE browsers
   $output .= '<param name="src" value="'. $url .'" />
              <param name="AUTOPLAY" value="true" />
              <param name="KIOSKMODE" value="false" />' . "\n"
   . _video_get_parameters($node) .
   '<p>'. t('Your browser is not able to display this multimedia content.') .'</p>
</object>'; // only one </object> needed becouse only one opening tag has been parsed by browsers


  /*
  $output = '<script language="JavaScript" type="text/javascript">';
  $output .= "InsertQuicktimeVideo('{$node->vidfile}','$height','{$node->video_scaled_x}');";
  $output .= '</script>';
  */


  $output = theme('video_format_play', $output, t('http://www.apple.com/quicktime/download'),
                                      t('Link to QuickTime Download Page'),
                                      t('Download latest Quicktime Player'));
  return $output;
}

Do you see the autoplay line?
<param name="AUTOPLAY" value="true" />

You should change that to
<param name="AUTOPLAY" value="false" />
in the overrrided function.

Hope this helps.

fax8’s picture

Some more hints:

* Create a template.php file in your theme folder
* insert into that file a function called phptemplate_video_play_quicktime($node) with the same code as the one above
* change the autoplay line in the phptemplate function as detailed above

scottrigby’s picture

oddly this doesn't work for me in Garland theme :(

fax8’s picture

what problem did you find?

scottrigby’s picture

Oh - the only problem is that it continues to auto-play even after following the steps above. I'm not sure how to trouble-shoot further from there though.
- I literally copies the function from #3 exactly
- changed the autoplay value to "false"
- changed the name of the function to "phptemplate_video_play_quicktime($node)"
- and placed in my template.php file
This didn't stop the video from auto-playing in my (slightly) modified Garland theme.
But this isn't my biggest problem - please see this issue #234767: Thickbox preview from thumbnail doesn't work
(the main reason I wanted to stop auto play is because when using print_r to show page variables the multiple instances of auto playing videos bog down the process...)
Thanks!
Scott

drew reece’s picture

Isn't the autoplay happening because you are using print_r to dump the page vars. Does it still autoplay when the page has no print_r() statement.

IIRC the print_r doesn't use the theme function, it just spits the variables including paths to the files. The browser may be autoplaying by default because the autoplay=false isn't themed into the embed link.

Drew

leramulina’s picture

Where can I find this file?

markDrupal’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Component: Documentation » Code
Category: support » feature
Status: Active » Needs review
StatusFileSize
new2.71 KB

I made a patch to the 6.x branch, but it should be easily applied to the 5.x versions as well. This patch adds an option to the video settings for Autostart

It can be enabled or disabled.

tharun.patel’s picture

Change autoplay/autostart = 0, setting it to false has no effect in firefox

hypertext200’s picture

Status: Needs review » Fixed

added to dev

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.