Full stack dev. Building with Python, JS, Jekyll and more. Looking to answer technical questions and coach on career direction, learning path and projects.
Full stack dev. Building with Python, JS, Jekyll and more. Looking to answer technical questions and coach on career direction, learning path and projects.
The first bit to solve how to get the latest (first) item in an RSS feed (which is XML data) using JS.
This tutorial covers that. Instead of forEach, you just need one item.
Like with
myArray[0]
. And find theurl
or similar attribute.css-tricks.com/how-to-fetch-and-pa...
Once you have that item, you can use it in an audio player. Perhaps using the HTML5 builtin audio player.
Tutorial w3schools.com/html/html5_audio.asp
I would recommend making the player an existing HTML on the page. Maybe with empty string for the URL and mark it as hidden or grayed out.
So to put it all together:
Load the RSS and parse it.
Look for a value in the first item.
And whatever value you get out as a URL, you set that on the existing audio element. And mark it as enabled or no longer hidden.
If you run into issues, then post your partially working JS here maybe as a gist.
Including the RSS URL.