I have embedded a preview of youtube video on the sidebar but there was no direct way to stop it from autoplaying regardless of the selection on 'preview_autoplay' checkbox.

So I had to trace back to the bug and this is what found.

File : youtube.inc
Line: 383
function emvideo_youtube_preview($embed, $width, $height, $field, $item, $autoplay) {

was missing a parameter and should have included '&$node' in the list of parameters:

function emvideo_youtube_preview($embed, $width, $height, $field, $item, &$node, $autoplay) {

otherwise, the $autoplay variable in fact passes the $node object properties to the theme function instead of required values 1 or 0.

Comments

avpaderno’s picture

Status: Needs work » Active

patch (code needs work) should be used if the report includes a patch, but it's not this the case. The more appropriate status is simply active.

alex ua’s picture

Version: 6.x-1.0-alpha6 » 6.x-1.x-dev
Status: Active » Fixed

This has been fixed in the latest development version. I'll post Alpha7 later today.

budk’s picture

Noted.. thanks for guidance and the fix.

Status: Fixed » Closed (fixed)

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

lindsayo’s picture

Status: Closed (fixed) » Active

This still seems to be an issue. I am using the Youtube media module and I have tried both the 2.x emfield module as well as the 2.x dev. When the user clicks any video, the next one in line starts to play. But this only is a problem in multiple value CCK fields. I guess I can work around this for now by having multiple fields, rather than multiple values in one field.

avpaderno’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

I am closing this issue, which is for a not supported Drupal version.