tags:

views:

319

answers:

1

I need the player to play all the files in the folder in a continuous loop, the folder is updated regularly with different video files (and page is refreshed) so I cant name them one by one. thanks for the help.

A: 

You'll need some way for JavaScript in the web page to get a list of the video file names from the server.

There are a few different ways to do this:

  • You can have Apache automatically generate a directory listing, which you could then retrieve using XHR in JavaScript, parse, and then control the video element. Check out the Apache config option Indexes
  • You can write a server-side script or "page" which would provide a list of the video file names in the format of your choice — I'd suggest either LF-delimited text/plain, or JSON — and then use XHR in JavaScript to retrieve the data, then control the video element
Avi Flax
Wow thanks for the answer, but I feel totally lost reading what you posted, I would really appreciate a little guidance, maybe an example on how to accomplish this. Thanks.
Chris