I am trying to create an MP3 player in HTML5. Almost all the work is done, but I need me to replace the default controls from the tag <audio>and create my own controls. Simple controls such as play, pause, stop and volume, but I want to create a progress bar that tracks the duration of audio / MP 3 when a specific position on the track goes when you click on the corresponding position. As in the following example.
http://msdn.microsoft.com/en-us/library/ie/gg589528(v=vs.85).aspx
The thing is, in the above example, the / MP 3 file is already loaded, and I actually create an audio element using document.createElement("audio");
When I tried to use different ways to modify the above example, I basically get the error message "cannot call addeventlistener from null". I want this player to run in Chrome.
Thank you in advance for your support and help.
source
share