Re: Server streaming?
| From: | Christoph M. Becker | Date: | Fri, 30 Dec 2016 18:30:07 +0000 |
| Subject: | Re: Server streaming? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-325922@lists.php.net to get a copy of this message | ||
On 30.12.2016 at 06:11, Jeffry Killen wrote:
> I am doing an mp3 player in javascript/html5 and am having trouble.
> Key methods and javasript object properties not responding properly.
> References to currentTime property ( time line of the audio file) causing
> failures and errors.
>
> I have found some posted info suggesting the problem may be that the
> server (in my case Mac OSX Apache 2.24, localhost for dev purposes)
> may not support streaming.
That is possible, but I suggest to look at the HTTP headers to be sure.
First check whether the request headers actually have a Range or
If-Range header; then check whether the response has status code 206 or
416 (or something else). For details refer to
<https://tools.ietf.org/html/rfc7233#section-3>.
> This posting includes a php script that
> references
> $_SERVER['HTTP_RANGE'].
If the request contains a Range header, $_SERVER['HTTP_RANGE'] would be
set; otherwise not.
> Is there anything in the manual that might help me out with that, or other
> info, suggestions?
>
> The posting is here:
>
> http://pervasivecode.blogspot.com/2012/09/currenttime-not-working-with-html5.html
>
>
> I presume that the php script would need to respond to an async request.
Probably yes, but I don't see how that would be relevant.
> Thanks for time and attention
> JK
--
Christoph M. Becker