Re: Browser could not get mp3 files from http site
| From: | Ashley Sheridan | Date: | Mon, 15 Sep 2008 06:36:16 +0000 |
| Subject: | Re: Browser could not get mp3 files from http site | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-280146@lists.php.net to get a copy of this message | ||
On Mon, 2008-09-15 at 08:43 +1000, hce wrote:
> On Sun, Sep 14, 2008 at 7:31 PM, Ashley Sheridan
> <ash@ashleysheridan.co.uk> wrote:
> > On Sun, 2008-09-14 at 13:54 +1000, hce wrote:
> >> Thanks Dan and Ash. I've tried object tag, it crashed my firefox. The
> >> audio.php file generates a simple following html. You need media
> >> player plugin to test it. The web server
> >> http://www.myweb.com/audio.php is my home server. Let
> >> me further
> >> discribe the problems, it is not the embed tag problem, it is the
> >> source in the embed tag does not download to the browser (In fact,
> >> I've tried the object tag as Ash suggested, the object tag crashed
> >> firefox):
> >>
> >> (1) If I open following audio.html directly from "Open File"
> >> file:///home/webserver/audio.html, the embed tag works just fine, the
> >> audio can play. The /home/webserver is the directory where all
> >> applications audio.php and audio.mp3 are stored.
> >>
> >> (2) If I open from http://www.myweb.com/audio.php, the
> >> audio.mp3 does
> >> not download to firefox. Nothing is played.
> >>
> >> <html>
> >> <embed src="audio.mp3" autostart="1"></embed>
> >> </html>
> >>
> >> Thanks.
> >>
> >> Jim
> >>
> >>
> >> On 9/13/08, Ashley Sheridan <ash@ashleysheridan.co.uk> wrote:
> >> > As far as I'm aware, the embed tag is not supported in any HTML
> >> > standard, and as such, it's a little hit and miss. Depending on what you
> >> > want to achieve, you should look towards the object tag instead:
> >> >
> >> > http://joliclic.free.fr/html/object-tag/en/
> >> >
> >> >
> >> >
> >> > Ash
> >> > www.ashleysheridan.co.uk
> >> >
> >>
> > As far as i know, embed will never work on Firefox, but I could be wrong
> > on that. How exactly were you using the object tag? It shouldn't be
> > crashing the browser.
>
> Please see following object tag I tried, there was a following error.
> Sometime the browser freezed, sometime it was fine. It did not display
> the small image block in width="200" height="20". Nothing was played.
>
> Error: [Exception... "Component is not available" nsresult:
> "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame ::
> file:///usr/lib/firefox-3.0.1/components/nsSessionStore.js ::
> sss_saveState :: line 1896" data: no]
> Source File: file:///usr/lib/firefox-3.0.1/components/nsSessionStore.js
> Line: 1896
>
>
> <object type="audio/mpeg" data="audio.mp3" width="200"
> height="20">
> <param name="src" value="audio.mp3">
> <param name="autoplay" value="true">
> <param name="autoStart" value="1">
> alt : <a href="audio.mp3">test audio</a>
> </object>
>
> Thanks Ash.
>
The only thing I can see wrong is your mime-type. It should be
audio/x-mpeg. As far as that, everything else looks OK.
Ash
www.ashleysheridan.co.uk