How can I play the audio file from my api data when clicking on the button for that instance?
I found this API with fieldrecordings of birdsongs. The audiofile of the recording is a link like this: “file”: “https://xeno-canto.org/544454/download”, which downloads the audiofile when clicked.
I made a class to instance objects with the data that I need, as well as a html string that creates a button for that bird that should play a recording of the birdsong when clicked.