Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #11741
| From | "J.O. Aho" <user@example.net> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: detecting a file in use |
| Date | 2013-11-06 18:34 +0100 |
| Message-ID | <bdvcthFsctU1@mid.individual.net> (permalink) |
| References | <19q44k7e0oext.1x1a126s3btq$.dlg@40tude.net> |
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
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
detecting a file in use richard <noreply@example.com> - 2013-11-06 12:12 -0500 Re: detecting a file in use "J.O. Aho" <user@example.net> - 2013-11-06 18:34 +0100 Re: detecting a file in use Tobiah <toby@tobiah.org> - 2013-11-06 09:36 -0800 Re: detecting a file in use The Natural Philosopher <tnp@invalid.invalid> - 2013-11-06 17:36 +0000 Re: detecting a file in use Luuk <luuk@invalid.lan> - 2013-11-06 19:01 +0100
csiph-web