I am attempting to play a sound from a custom marker on Google Maps, I am pulling in the longitude, latitude and the audio file name from my database and I am trying to play the corresponding audio file from my directory when the marker is clicked, here is what I have so far.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Audio Capture - Home</title>
<link rel="stylesheet" href="css/style.css">
<style>
#map-canvas {
width: 500px;
height: 400px;
background-color: #CCC;
}
</style>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js"></script>
<script src="/audiojs/audio.min.js"></script>
<script>
audiojs.events.ready(function() {
var as = audiojs.createAll();
});
</script>
<script type="text/javascript">
//<![CDATA[
</script>
</head>
<div class="login">
<body onload="load()">
<div id="map" style="width: 500px; height: 500px"></div>
</body>
</div>
</html>
In the BindInfoWindow that is where I am trying to select the file path plus the audio tag afterwards.
The audiotag (which is the the file name) shows in the infowindow but no sound plays, ideally a small media player with pause, play and the length would show.
Another idea I had would be to pass that file name from the info window outside of the Google map into a separate media player? However, I'm unsure how to do this.
Any help would be appreciated, thank you.