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
Comment #1
avpadernopatch (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.
Comment #2
alex ua commentedThis has been fixed in the latest development version. I'll post Alpha7 later today.
Comment #3
budk commentedNoted.. thanks for guidance and the fix.
Comment #5
lindsayo commentedThis 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.
Comment #6
avpadernoI am closing this issue, which is for a not supported Drupal version.