So currently I have a simple template I use across all pages. It goes something like this:
<html>
<head></head>
<body>
<h1>My website</h1>
<div id="audio-player">
<audio controls>
<source src="music.mp3" type="audio/mpeg">
</audio>
</div>
<p>Content</p>
</body>
</html>
Where the <p>Content<p>
is located, is the different content I have. One page has the history of our music group, and the other page has images of our instruments, for example, between the <p>
tags.
The thing is, every time someone navigates between the pages on our site, the music stops. How would I link the <div id="audio-player">
to load across the site without stopping the music? I heard there is a way of using AJAX to do this sort of thing, but I cannot find a way to implement it so that the <div>
appear on all site and never unloads?