6olden
6olden

Reputation: 121

Wordpress audio player that plays Soundcloud AND files from server

I have been searching for a way to get this done. Let me explain, it's simple.

This is Wordpress by the way... My client would like a modern looking player that plays both Soundcloud and uploaded tracks. But the way the files are ordered, is post order. So let's say, yesterday I posted a Soundcloud track, today I post an uploaded track and tomorrow a Soundcloud track. I want these files to be played like a playlist. Ordered by post date.

I already have experience with the Soundcloud API.

Now I have been thinking about this, just a rough plan but I would like to get some C&C and advice, I want to be sure I'm not going to put in a lot of time and effort for nothing:

  1. Somehow retrieve the file and Soundcloud URLS (these are added in the posts) and put them in an array or list. The way I would like to make this work is like this:
  2. Retrieve URL field from posts in database
  3. Add these in the array/list

Simple. But the problem is, this site is old. It's a music blog which is 7 years old. That means there are 1000s of posts. And I have no idea how and even if there are audio URL fields in the database which are connected to posts.

I have no access to the databases right now so I can't give you guys more info.

But is this doable?

Thanks in advance!

Upvotes: 0

Views: 103

Answers (1)

Loopo
Loopo

Reputation: 2195

Sure it's doable, and it sounds like you're on the right track (excuse pun).

If you know how to get listings with dates and URL out of Soundcloud, then you need to get your local data into the same format (fix differing time-zones if neccessary, converting to unix timestamps works well)

Then use array_merge() to join your arrays and uasort() the results.

Upvotes: 1

Related Questions