Hi, I have this module setup so that the video is inline with the node, however when the node is loaded the video automatically starts if it is an uploaded video. Is there anyway to add a play button so that it doesn't automatically start upon page loading?

Also, when adding custom fields to the video, on the node page I always end up with <br class="clear" /> at the end of each custom field. How can I remove this?

Thanks for any help, I appreciate it.

Comments

fax8’s picture

remove autoplay: it depends on the player you are using.
I already helped someone here on drupal.org making the defaul behavior to no autoplay.
Do a search on drupal.org, maybe you can use that info.

Have a look at video_customfields.module and search for that br line and delete it.

Fabio

Jboo’s picture

Thanks Fabio, i've now fixed the <br class="clear" /> problem, but can't seem to find the issue about the autoplay you mention. I'll keep searching as this would be great to get done.

Thanks.

schwa’s picture

I'll write this up here, having just hunted/pecked to do it myself:

To switch from autoplay to non-autoplay: you just want to find the autostart/loop/autoplay option for each player type written up in video.module, and then change its value from true to false.

For flv videos change this line in the video.module file:
<param name="FlashVars" value="baseURL='. $base_url .'&videoFile='. $file .'&autoPlay=true&bufferLength=5" />' . "\n"

to
<param name="FlashVars" value="baseURL='. $base_url .'&videoFile='. $file .'&autoPlay=true&loop=false&bufferLength=5" />' . "\n"

for Quicktime, change this line in the video.module file (I'm including the surrounding chunk o' code):
from

// 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->videox .'" 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"

to

// 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->videox .'" 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="false" />
              <param name="KIOSKMODE" value="false" />' . "\n"

for Realmedia format videos:
from

  $output .= '<param name="src" value="'. $url .'" />
              <param name="_ExtentX" value="7276" />
              <param name="" value="3307" />
              <param name="AUTOSTART" value="true" />
              <param name="SHUFFLE" value="0" />
              <param name="PREFETCH" value="0" />
              <param name="NOLABELS" value="0" />

to

  $output .= '<param name="src" value="'. $url .'" />
              <param name="_ExtentX" value="7276" />
              <param name="" value="3307" />
              <param name="AUTOSTART" value="false" />
              <param name="SHUFFLE" value="0" />
              <param name="PREFETCH" value="0" />
              <param name="NOLABELS" value="0" />

and for Windows Media Format (WMV) files, change:
from

// params will be passed to both IE or not IE browsers
   $output .= '<param name="src" value="'. $url .'" />
              <param name="URL" value="'.$url.'" />
              <param name="animationatStart" value="true" />
              <param name="transparentatStart" value="true" />
              <param name="autoStart" value="true" />
              <param name="showControls" value="true" />

to

// params will be passed to both IE or not IE browsers
   $output .= '<param name="src" value="'. $url .'" />
              <param name="URL" value="'.$url.'" />
              <param name="animationatStart" value="true" />
              <param name="transparentatStart" value="true" />
              <param name="autoStart" value="false" />
              <param name="showControls" value="true" />
Jboo’s picture

Thank you. I seemed to get errors when copying and pasting the Realmedia changes but if I changed it by hand it seemed to produce no errors.

SWF videos are causing a bit of a headache at the moment. They play automatically and continue on loop. I would like to stop the loop and add a "play" button, and even a "stop" button if possible.

If anyone knows how I can do this i'd really appreciate it.

Thanks.

hypertext200’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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