HelgeMattig Posted August 24, 2021 Share Posted August 24, 2021 (edited) Inspired by beatport.com i built an audio player with waveform illustration using wavesurfer-js.org Check it out here: http://gearscript.de/wavesurfer Just click "Load into Player" and surf the website for a bit, it pretty much explains itself. The Problem: My cms works like this site1.php site2.php site3.php global.php (included in all siteX.php, contains site header and other global code) The Problem is, if the user jumps from site1.php to site2.php i do not want the player to interrupt but keep playing the music. Just like on beatport. In my example i did that by using an iframe. But i cant use an iframe in my cms application because i want the player to interact with the cms and its just a lousy solution overall. I do not want to use a popup also because that would negatively impact the "user experience". So what do i do? I never did something like this before and i just dont know what to do. Edited August 24, 2021 by HelgeMattig Quote Link to comment https://forums.phpfreaks.com/topic/313592-beatport-like-audioplayer-need-help/ Share on other sites More sharing options...
requinix Posted August 24, 2021 Share Posted August 24, 2021 There might be some fancy Javascript method, but barring that, you need to have some part of the page that does not change when clicking on links or whatever. For the most part, websites nowadays solve that with the majority of the site served through a Javascript frontend - rather than browsing to site1.php and site2.php and whatever like normal, the browser is told to request those files in the background and then Javascript places it into the page. It looks like regular navigation, to some degree, but the browser never actually "leaves" the first page. Frames can still work, though. There is a way to communicate between the different frames: https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage Quote Link to comment https://forums.phpfreaks.com/topic/313592-beatport-like-audioplayer-need-help/#findComment-1589330 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.