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]
Comment | File | Size | Author |
---|---|---|---|
#8 | video_filter-n1908050-8.patch | 5.35 KB | DamienMcKenna |
Comments
Comment #1
sydneyshan CreditAttribution: sydneyshan commentedApparently 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).
Comment #1.0
sydneyshan CreditAttribution: sydneyshan commentedAdded example of usage.
Comment #2
DamienMcKennaPlease change the issue status to "needs review" when you upload a patch :)
Comment #3
DamienMcKennaRerolled.
Comment #4
DamienMcKennaShould be included in the next release, though it needs to be updated after some of the other issues are also updated.
Comment #5
frankdesign CreditAttribution: frankdesign commentedPatch #3 works great. Only one issue though, modestbranding must come first in the order of parameters, otherwise it's ignored.
Comment #6
blackdog CreditAttribution: blackdog commentedComment #7
DamienMcKennaUpdated to put 'modestbranding' attribute first.
Comment #8
DamienMcKennaThis puts back the protocol-less URL that the previous patch removed.
Comment #10
DamienMcKennaCommitted. Thanks.