I'm attaching a patch I've made to Video Filter 7.x-3.1 to allow the passing of additional parameters to YouTube clips (loop, modest branding, controls, autohide, showinfo, theme, color).

The patch also addresses some issues with video heights/widths being calculated - the 7.x-3.1 branch was incorrectly using the $filter->settings array for data rather than calculating height and width based on the supplied height/width and ratio values.

Please assess this against your branch and take what you need from it.

I needed looping YouTube video with no YouTube branding, hidden controls, and a height calculated based on 16:9 ratio and set width which the 7.x-3.1 branch could not do.

Using this patched branch I can use the following input text:

[video:http://youtu.be/aGPTVMaMfn0 width:672 ratio:1280/720 autohide:1 modestbranding:1 controls:0 control_bar_height:0 loop:1 showinfo:0 autoplay:1 theme:light color:white]

Members fund testing for the Drupal project. Drupal Association Learn more


sydneyshan’s picture

Apparently YouTube's looping system within their AS3/flash player is buggy and requires you to supply the video url as the playlist parameter to work.

I've attached an updated patch that does this.

Just a note to other Drupal developers trying to loop video within an iframe - I'm getting an annoying black frame flickering at the end of each loop. This doesn't appear when the iframe url is accessed directly using a web browser, which makes me think it is a bug only seen when the flash player is viewed within an iframe. This isn't visible in Safari, but it is in every other web browser (IE/Firefox/Chrome).

sydneyshan’s picture

Issue summary: View changes

Added example of usage.

DamienMcKenna’s picture

Issue summary: View changes
Status: Active » Needs review

Please change the issue status to "needs review" when you upload a patch :)

DamienMcKenna’s picture

Version: 7.x-3.1 » 7.x-3.x-dev
4.53 KB


DamienMcKenna’s picture

Should be included in the next release, though it needs to be updated after some of the other issues are also updated.

frankdesign’s picture

Patch #3 works great. Only one issue though, modestbranding must come first in the order of parameters, otherwise it's ignored.

blackdog’s picture

Status: Needs review » Needs work
DamienMcKenna’s picture

Status: Needs work » Needs review
4.62 KB

Updated to put 'modestbranding' attribute first.

DamienMcKenna’s picture

5.35 KB

This puts back the protocol-less URL that the previous patch removed.

DamienMcKenna’s picture

Status: Needs review » Fixed

Committed. Thanks.

Status: Fixed » Closed (fixed)

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