FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » detecting a file in use
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: detecting a file in use [message #183649 is a reply to message #183648] Wed, 06 November 2013 17:34 Go to previous messageGo to previous message
J.O. Aho is currently offline  J.O. Aho
Messages: 194
Registered: September 2010
Karma:
Senior Member
On 06/11/13 18:12, richard wrote:
> What should be used to know when a request has been made for the server to
> load an audio file?
> As I see it, the server has to know that a request has been made.
>
> You, the user, using your browser, sees a list of songs that you can play.
> You click that link, the browser sends a request to fetch that file.
> This is the point in time when I want to know that the request has been
> made.

three ways to do it

Simple: parse the log file
Medium: use a wrapper file which notify that someone requested a file
and then serve the file, this can destroy fast
forward/rewind/pause/resume features.
Complicated: Make the JavaScript to call a page and tell which file the
user is loading and if they do buffer or not.

> Javascript takes care of the playing side.
> But still, the server has to have some way of knowing which audio file is
> being requested and whether or not buffering is needed.


> Now that the audio file has played, the server needs to know that file has
> completed downloading.
> So what do I use to know this has happened?

If you use wrapper and the page terminates, then it's finished with the
download. If you use the javascript then make an ajax call and tell that
the song has finished to play.

--

//Aho
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: accessing nested unknown unserialized objects
Next Topic: detection of 2d array?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 14:25:23 GMT 2024

Total time taken to generate the page: 0.04531 seconds