Closed (fixed)
Project:
SWF Tools
Version:
5.x-1.x-dev
Component:
SWF Tools
Priority:
Critical
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
20 Dec 2007 at 06:05 UTC
Updated:
20 Sep 2008 at 21:52 UTC
Hey,
One Pixel Out is giving me an error finding file message, but I know the file is there. To further prove that the file is actually there, when I switch to Wijering's flash media player it plays the file with no problems. I would like to have Wijering flash media player play a video file with an audio only version below it, in the form of 1pixelout, that way users can easily tell which is a video and which is an mp3. This will allow both dial-up and broadband users to have access to the content on my site.
Any help would be greatly appreciated.
Thanks!
Comments
Comment #1
jmspldnl commentedAfter thinking about it for a little bit. I realized that you would probably want a little more information. Here is a link to a page with both players trying to play the same file.
http://www.lewisburgumc.com/node/266
You can see that only Wijering's flash player plays the file though.
Thanks!
Comment #2
McCool commentedHi.
I am having exactly the same problem.
Wijering's flash player plays the mp3 fine, but the 1pixelout player says "Error opening file".
Did you fix it? Anyone else?
Cheers.
Comment #3
soundsational commentedSame here. I just get an error when tryinf to play it.
Comment #4
escoles commentedSame problem. Only Wijering's player works. The demos on emspace are also broken for me:
http://emspace.com.au/node/25
I've tried it in Firefox 2.x and Safari 3 on my Mac, and IE7 on Windows. Behavior is the same every time: The object displays "buffering" for a brief moment, then shows the message "error opening file."
I get similar behavior with the default viewers and with Simpleviewer, but, as noted, Wijering's player works.
Comment #5
escoles commentedOK, I know what's causing this, but haven't yet dug in to how to fix it -- or, more importantly, determined why anybody can ever get any of these players to work at all.
Here's the deal:
When SWFTools is writing out the OBJECT tagset, it encodes the URL for the audio file so that it looks like this:
http%3A/%252Fdomain.tld/path....I copied the source code, pasted it into the body tag and edited the URL in the source so that it read as follows:
http://domain.tld/path....Now it works, for that instance.
I looked at the page source for the examples on emspace.com.au, and they have the same issue.
Comment #6
will kirchheimerYeah, I was having that problem as well with the single file/older players
Here is my ugly solution:
swftools.module
Around line 430 (my version) in function swftools_swftools_embed, right above the html embed writer:
$foo = array('%3A/%252F');
$bar = array('://');
$P['flashvars'] = str_replace($foo, $bar, $P['flashvars']);
Comment #7
escoles commentedThanks, I took a quick look at it and didn't know where to begin.
Does anybody know why the protocol punctuation gets encoded that way? What does it mean? Jeroen's viewer can handle it just fine, but it looks to me as though it means nothing.
Comment #8
will kirchheimercross posting this solution from http://drupal.org/node/191279#comment-750952:
The below function (line 725 of swftools.module) seems to be the culprit:
function _swftools_get_flashvars_string(&$flashvars) {
foreach ($flashvars AS $var => $value) {
$flashvars[$var] = str_replace(array('&', '=', '?'), array('%26', '%3D', '%3F'), $value);
}
$encoded = drupal_query_string_encode($flashvars);
// '#' seems to encode as %2523, reverse this, using a more robust hex prefix..
$encoded = str_replace('%2523', '0x', $encoded);
return $encoded;
}
So add ugly hack there:
function _swftools_get_flashvars_string(&$flashvars) {
foreach ($flashvars AS $var => $value) {
$flashvars[$var] = str_replace(array('&', '=', '?'), array('%26', '%3D', '%3F'), $value);
}
$encoded = drupal_query_string_encode($flashvars);
// '#' seems to encode as %2523, reverse this, using a more robust hex prefix..
$encoded = str_replace('%2523', '0x', $encoded);
// begin hack
$foo = array('%3A/%252F');
$bar = array('://');
$encoded = str_replace($foo, $bar, $encoded);
// end hack
return $encoded;
}
This seems to filter down better for javascript and raw embedding, you can remove the other location of the hack.
I am guessing it is the:
$encoded = drupal_query_string_encode($flashvars);
But not up for hunting that down today.
Comment #9
Stuart Greenfield commentedThis is another instance of the encoding issue that is reported a few other times in the issue queue.
It's fixed in the latest dev code, so I'll set this one to "patch (code needs review)" and it can be closed when testing is finished.
Comment #10
Stuart Greenfield commentedSetting to fixed as new releases of SWF Tools 5.x-2.0 and SWF Tools 6.x-1.1 are now available which address this issue.
Comment #11
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.