I've tried to access and play my raw .mp4 file with Chrome and Firefox on this location:
http://localhost/myproject/myfiles/myfile.mp4
It takes more that 5 minutes to be able to play a single file. Why was this happening. (it also happens to my .mp3 files too)
This causes my javascript application seems not working though you have to wait more than 5 minutes to see it in action.
How do I speed up the process. Here's the code for playing .mp3 files:
var audio = document.createElement('audio'),
source = context.createMediaElementSource(audio);
audio.setAttribute('autoPlay','false');
audio.src = path + mp3.file;
audio.addEventListener('canplay', function(e) {
audio.play();
analyser.smoothingTimeConstant = 0.8;
analyser.fftSize = 512;
source.connect(analyser);
}, false);
Thank you,