Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: How to add more features... #2

Open
rchrdnsh opened this issue Oct 9, 2019 · 0 comments
Open

Question: How to add more features... #2

rchrdnsh opened this issue Oct 9, 2019 · 0 comments

Comments

@rchrdnsh
Copy link

rchrdnsh commented Oct 9, 2019

Hi Upmostly,

I emailed you earlier this week, but figured it would be easier to just create an issue to ask you a question, so I hope that's ok :-)

I'm curious how to add more features to this example. I have been trying to teach myself but I'm a bit lost. I'm currently trying to add time elapsed counter, a progress bar that I can jump around in the song with, and a total duration number on the other end. I would also like to add a volume fader as well, among other things.

As far as I can tell, you are using the HTML Audio Element, which inherits from the HTML Media Element, is this correct? If that is the case, then I'm trying to do stuff like this, like get the current time of the current playing track:

 // Get the current time of the currently playing track
function currentTime() {
  if (state.isPlaying) {
    state.audioPlayer.currentTime()
  }
}

...but it doesn't seem to be working. If there is any advice or pointers that you can give in regards to interfacing with Audio(), React, and the Context API? I am all ears :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant