Thanks, but setting up the service isn't where I'm having the trouble. Let me tell you exactly what I'm trying to accomplish, maybe there's a better way...
I'm using soundmanager2 api. I've created 2 new javascript (objects), soundmanager2.js and bar-ui.js (the user interface) and a new CSS (object), bar-ui.css.
I've got an HTML control on my starting page. If I put the following code (with hard coded url to audio file) in the control, everything works fine.
Code: Select all
[url=http://#play]Play / pause[/url]
<!-- playlist <ul + <li markup will be injected here --
<!-- if you want default / non-JS content, you can put that here. --
JavaScript is required.
0:00
Code: Select all
0:00
span class="sm2-inline-button sm2-volume-control volume-shade"/span
[url=http://#volume]volume[/url]
<!-- playlist content is mirrored here --
Code: Select all
ul class="sm2-playlist-bd"
li[url=http://www.somewebsite.com/20150322.mp3][b]Bill Johnson[/b] - The Power of the Mind[/url]/li
/ul
But...I need to pull the audio file name from an RSS to get the latest available file. I've tried mapping the service to the control and using javascript to return the updated html and while it renders fine, it does not execute the code within the bar-ui.js.
I found that if I map the RSS to a control on the page, then set a local storage variable to the latest file name using javascript, then create a function to assemble the html (using the local storage variable) and set the HTML control in the page load event...it works, but not the first time. The first time through the local storage variable is not yet set. So...I figured if I could (via javascript) essentially read the RSS response and build the html for the control in the page load event, it should work.
Problem is, I can't figure out how to read the RSS response (XML). I would imagine it would be some code in the success or complete function of the code that executes the REST service, but I haven't seen any examples of capturing that XML response in javascript.
If there's a better way to do this, I'm all ears. If not, I need to know what to put in the success or completion function to capture the XML.
Thanks again.