The flashparam 'autostart' is not working correctly in this version. Currently, the HTML code produced sets "autostart=1" or "autostart=", and that is a problem because the values the flash player is looking for are actually "autostart=true" and "autostart=false".

My solution was a ternary operator to convert from boolean values to words (true/false) in the HTML output.

(see attached patch)

CommentFileSizeAuthor
#3 flashvideo-patch_5.txt1.08 KBms2011
flashvideo-patch_4.txt1.34 KBms2011

Comments

travist’s picture

Mike,

You are a maintainers dream come true... Not only do you find the bugs, but you offer solutions. Great work!!! Thank you so much for your efforts. I am working on just a maintenance release for FlashVideo and this will be added. I will not add any new features until after version 2.0. I really want the FlashVideo 2.0 to be a rock solid version.

Thanks again,

Travis.

travist’s picture

Status: Active » Needs review
ms2011’s picture

Title: Flashparam 'autostart' not working... » Oops! My mistake...
StatusFileSize
new1.08 KB

Unfortunately this issue is my mistake and the previous patch should be rolled-back if anyone has applied it.

It turns out, when I was calling flashvideo_get_video() directly, I assumed $params['autostart'] would be a boolean value when it is actually a string 'true' or 'false'. The actual string is used everywhere else, so it was my fault for providing a boolean value. So outside of that, there's no real need for the ternary operator provided in my patch--and, in fact, it actually causes problems because both 'true' and 'false' strings evaluate to a TRUE boolean value.

A better solution is to document the arguments for that function in the source code so this kind of thing can be avoided. (see attached patch)

I apologize for any inconvenience.

Oh, and thanks for sharing your appreciation. I guess I have been submitting a number of patches to this module, but it is just because I need it to work for one my projects. It means a lot though, and Flashvideo is a great module to be able to contribute to! :)

travist’s picture

Status: Needs review » Fixed

FlashVideo Version 2.0.BETA has this fix.

Anonymous’s picture

Status: Fixed » Closed (fixed)