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)
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | flashvideo-patch_5.txt | 1.08 KB | ms2011 |
| flashvideo-patch_4.txt | 1.34 KB | ms2011 |
Comments
Comment #1
travist commentedMike,
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.
Comment #2
travist commentedComment #3
ms2011 commentedUnfortunately 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! :)
Comment #4
travist commentedFlashVideo Version 2.0.BETA has this fix.
Comment #5
(not verified) commented