I am trying to create a service for a project that allows javascript-based embed codes for sharing audio clips, such that the player appears on sites where it is embedded. Very much like a soundcloud clone, but on a far smaller scale and for private sharing only.
I am not sure how to go about this, but thinking of making the javascript write the HTML5 player dynamically into any page where the embed is placed, fetching the details needed to render the player into the page via JSON-P (to overcome the same origin policy) and streaming the audio clip directly from the main server. I will prefer to use the jQuery framework.
Is this the best method to go about this? I am trying to research, but I do not know how exactly to search for the information or where to start.
P.S. I also found this helpful S/O article about how soundcloud hides the URLs of the streaming media to prevent direct downloads