I was wanting to embed some animal sounds in a leaflet map my son and I are creating. Have images embedded, but would like sounds in the popup if possible.

Like embedding images, can this be done with some simple code in the attribute table referencing the .wav or similar files? attribute table

Obviously the attached image didn't work, but I was wanting something like this if possible.


I've not worked with QGIS Leaflet, but if every column in that table is just meant to be html that gets inserted in the popup, and you're ok with using HTML5 audio controls, try the following markup:

<audio controls><source src="audio/moo.wav"></source></audio>

You should be able to include the table wrapper, too, as you have above; again noting that I don't know how QGIS is inserting these columns into the Leaflet popup.

<table><tr><td><audio controls><source src="audio/moo.mp3"></source></audio></td></tr></table>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.