On a localhost install of Drupal I tried using the SWF filter like this:
<swf file="media/audio/myaudio.mp3">

The player didn't show.
But when I changed 'localhost' in my browser's URL to my IP address, it worked properly.

Comments

Stuart Greenfield’s picture

To diagnose this properly can you post the source code for the swf content as it appears when browsing using http://localhost, and as it appears when browsing to an IP address. Bear in mind that the <swf> format is cached as a filter, so you may need to create two nodes to generate two pieces of code.

In principle it should work in either case - swf tools doesn't do anything other than construct urls to refer to files, so whether you are using localhost, an ip address, or even a local server name, all should work ok.

The only issue can arise if you are generating xml playlists - these have the url coded in to them, but for a single file that shouldn't be the case.

joachim’s picture

It looks like it's a caching issue rather than the difference in URLs.
I've just tried making a flash node with an mp3 file, and:
- Firefox 2: nothing.
- Safari: fine
- Firefox 2 logged-out: fine
- Firefox 2 logged back in: nothing
- Tried using Devel module to empty the case and still nothing.

Here's the code Firefox 2 has:

<div class="swftools"><object width="300" height="50" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">
<param value="sameDomain" name="allowScriptAccess"/>
<param value="http://localhost/drupal/sites/all/modules/swftools/shared/1pixelout/player.swf" name="movie"/>
<param value="opaque" name="wmode"/>
<param value="#FFFFFF" name="bgcolor"/>
<param value="showall" name="scale"/>
<param value="autohigh" name="quality"/>
<param value="l" name="align"/>
<param value="true" name="allowFullScreen"/>
<param value="/drupal/files" name="base"/>
<param value="false" name="play"/>
<param value="false" name="menu"/>
<param value="false" name="loop"/>
<param value="autostart=no&loop=no&soundFile=http://localhost/drupal/files/flash/CarrollWalrusandCarpenter_64kb_0.mp3&width=300&height=50" name="FlashVars"/>
<embed width="300" height="50" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" allowscriptaccess="sameDomain" flashvars="autostart=no&loop=no&soundFile=http://localhost/drupal/files/flash/CarrollWalrusandCarpenter_64kb_0.mp3&width=300&height=50" salign="tl" allowfullscreen="true" base="/drupal/files" name="" play="false" menu="false" loop="false" quality="autohigh" scale="showall" bgcolor="#FFFFFF" wmode="opaque" src="http://localhost/drupal/sites/all/modules/swftools/shared/1pixelout/player.swf" swliveconnect="default"/>
</object></div>
Stuart Greenfield’s picture

Status: Active » Closed (fixed)

Over a year old with no follow up. Localhost is working fine on test setups, and no other reports of an issue, so changing to closed.

Re-open / re-post if this wrong.