Add counter to audio player

(Jose) #1


I would like to add a time counter for an audio player. Is this possible?


(Hans-Gerd Claßen) #2


(Jose) #3

Wow!! thanks…

(Jose) #4

It is so useful. Only a question: how can I make the button to pause the music and not stop it to start again?


(Hans-Gerd Claßen) #5

it’s all out there: :smile:



(Jose) #6

Finally I’m using your example in my document. Using it with a player only, it works fine (play, stop, drag…) but if I want to add another player everything works but the pause.

I’ll try to explain you the steps:

  • Copy/paste the first player.
  • Changed the ids in the second player.
  • Duplicate the javascript files.
  • Changed the id references in both copies.
  • Assign on touch both javascript to playPause. First initAudio, then playPause.
  • The same with the first playPause and removing the javascript on scene load.

I think the problem is that I have more than one javascript to preload and I only one can be used. Is it possible to make a javascript to be used by all the players?

Thanks in advance.

(Jose) #7

It’s solved. Thanks.