CaptWeirdBeard Posted September 30, 2014 Share Posted September 30, 2014 Hi I wasn't sure exactly how to ask this so I made up a couple of mock-up pictures to help. I am making an audio website and currently I have each song in an html file being called into a list. they each have their own audio player. Works fine, but is a bit cluttered with many players on screen when the list is large. I would really like to have a master audio player in the header and each song in the list has just a play button when clicked will play the song in the main audio player at the top as shown below.I will have the main player at the top in a sticky/floating header so it remains on top and is always visible when scrolling. I hope this makes sense. Any help or guidance/tutorial links on how I can adjust things to achieve this would be greatly appreciated. Thanks Link to comment Share on other sites More sharing options...
niche Posted September 30, 2014 Share Posted September 30, 2014 Position the header div at the top with absolute and have your songs scroll under it. Link to comment Share on other sites More sharing options...
CaptWeirdBeard Posted September 30, 2014 Author Share Posted September 30, 2014 Cheers for the reply, but I am more looking for the method of having the play buttons talk to the main player in the header. Link to comment Share on other sites More sharing options...
niche Posted September 30, 2014 Share Posted September 30, 2014 (edited) What kind of discussion do you want them to have? Your OP is vague Edited September 30, 2014 by niche Link to comment Share on other sites More sharing options...
Ingolme Posted September 30, 2014 Share Posted September 30, 2014 You can have Javascript create a set of audio elements and attach the one currently being used. You can have it so that when a button is clicked all the audio elements stop playback before it changes the elements. Here's an introduction to controlling audio with Javascript. https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_HTML5_audio_and_video#Controlling_media_playback Link to comment Share on other sites More sharing options...
CaptWeirdBeard Posted October 1, 2014 Author Share Posted October 1, 2014 Thanks! appreciate it Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now