The video allways autoplays, no matter what.

/**
 * the embedded flash displaying the ustream video
 */
function theme_emvideo_ustream_flash($embed, $width, $height, $autoplay, $options = array()) {
  static $counter;
  if ($embed) {
    $counter++;
    $autoplay = isset($options['autoplay']) ? $options['autoplay'] : $autoplay;
    $autoplay_value = $autoplay ? 'true' : 'false';

    $output .= "<object type='application/x-shockwave-flash' height='$height' width='$width' data='http://ustream.tv/flash/video/$embed' id='ustream-video-$counter' ><param name='movie' value='http://www.ustream.tv/flash/video/$embed' /><param name='allowScriptAccess' value='always' /><param name='quality' value='best' /><param name='scale' value='noScale' /><param name='wmode' value='transparent' /><param name='FlashVars' value='autoplay=$autoplay_value' /><param name='allowfullscreen' value='true' /></object>";
  }
  return $output;
}

Setting the autoplay to false here stops this.

<param name='FlashVars' value='autoplay=false' />

CommentFileSizeAuthor
#2 emfield.theme-args.patch2.47 KBlyricnz

Comments

KAP10’s picture

I have the same problem. UStream video plays automatically even though I have set it to "no" in the field settings. I would like to try your solution, but I don't know the location of the FILE where I can insert
. Can you help direct me?

lyricnz’s picture

Version: 6.x-1.15 » 6.x-1.19
Status: Active » Needs review
StatusFileSize
new2.47 KB

Same problem here, with current emfield release. The problem is that theme_emvideo_video_video() calls the provider theming function with the following arguments:

   ($code, $width, $height, $field, $item, $node, $autoplay, $options = array()) 

However ustream gets these arguments wrong:

function emvideo_ustream_video($embed, $width, $height, $field, $item, $autoplay, $options = array()) {

ie: missing out $node. This same bug is in ustream.inc, ustreamlive.inc and voicethread.inc.

KAP10’s picture

Status: Needs review » Closed (fixed)

User fixed own problem.

XiaN Vizjereij’s picture

Status: Closed (fixed) » Needs review

Wow wait a minute .. thats an bug in the ustream.inc, ustreamlive.inc and voicethread.inc code, isn't it?

lyricnz’s picture

Yes, the bug still exists, as described in #2.

aaron’s picture

Status: Needs review » Fixed

awesome, thanks @lyricnz!

Status: Fixed » Closed (fixed)

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