1 Replies - 4947 Views - Last Post: 09 June 2012 - 02:47 AM

#1 TechnoBear  Icon User is offline

  • D.I.C Head

Reputation: 18
  • View blog
  • Posts: 222
  • Joined: 02-November 11

Embedded audio player with dynamic playlist drawn from folder contents

Posted 04 June 2012 - 11:46 AM

Ok, long title i know but was best i could think of to summarize it.

I am developing a website for a radio station (however web development is not one of my strong suites), what i am looking at doing is having an embedded audio player on each shows page which will be able to play any archived audio for that particular show.

I figured the best way to do this would be create a folder which houses all audio that i want played by the audio player. My thing now is i would like it so that i direct the host to a place to upload their show and it puts it in the right folder (I can do this bit) then the player just populates it's playlist based on the contents of the folder newest first.

I have done some google-ing and have come across flash based and javascript players, however everything i have come across requires that you manually create a list of the files you want to have played. I would rather not have to go in find if they bothered to upload it or not and then add the filename to a list.

Is This A Good Question/Topic? 0
  • +

Replies To: Embedded audio player with dynamic playlist drawn from folder contents

#2 Atli  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 3718
  • View blog
  • Posts: 5,989
  • Joined: 08-June 10

Re: Embedded audio player with dynamic playlist drawn from folder contents

Posted 09 June 2012 - 02:47 AM

Which server-side language will you be using for this? I suppose you could, technically, do this without a server-side language, but it would require a lot more effort that it would for, say, PHP to create a list of audio files available and send it to Javascript.

I recommend you do the following:

  • Create a page in your server-side language that compiles a list of the available audio files, and returns them in a XML or JSON format.

  • Create a Javascript file that queries that server-side page to get the list of available audio files, and then adds the files to a list for the user to select one. Once selected, Javascript will then feed the URL of the selected audio file to the audio player.

  • The audio player, whether you choose to use a Flash based player, the HTML5 <audio> element, or some old-school embed player, will then take the URL and play it. - I recommend you use something like MediaElement, which will provide a cross-browser compatible player, using HTML5 media if available but falling back on Flash or Silverlight when not.

Was This Post Helpful? 2
  • +
  • -

Page 1 of 1