I would like an audio player on my site that can play continuously while other pages of site are loaded and viewed. Is it done by a module, or where it is placed on site? i am currently using jquery and jplayer to play music on my site and all pages are dynamically linked with php. basically my site is an audio streaming site that have many albums and music files across different pages on my site and i really wanted jplayer to always sits at bottom through out of the site and when someone clicks the album's track jplayer starting playing it and user able to listen his played songs even he browse new pages on the site. p.s: just like spotify and other online streaming sites. any help would be very appreciated.
To have the music player continually play throughout the navigation of the site, you will need to call each page via AJAX, this way the browser actually never reloads. A simple example can found on this jsfiddle link here
$.ajax({
url:'dance-albums.php',
success: function (response) {
$('#output').html(response);
},
error: function () {
},
});
In this scenerio, I imagine you will have a music playing by default on the toolbar player? If you have different songs that you want the user to play, you can create a function on the the link which will call jPlayer("setMedia",media) and it should play with the mp3 parameter you will provide.