I really need to buffer entire audio/video before playing it. On normal case browser will buffer only some portion of audio/video. How to force browser to buffer 100% video before playing it?Or how to trigger buffer after playing it once.
Asked
Active
Viewed 610 times
0
-
1directly, you cannot. you can however mute and pragmatically advance the playhead, pausing just after an advance, thus triggering the buffering. – dandavis Nov 19 '15 at 06:44
-
how to trigger complete buffer after playing it? – Niroj Adhikary Nov 19 '15 at 06:51
-
thanks your comment helped me – Niroj Adhikary Nov 19 '15 at 09:05
1 Answers
0
Maybe in jQuery:
$(document).ready(function(){
var audioElement = document.createElement('audio');
audioElement.setAttribute('src', 'audio_file.mp3');
audioElement.play();
});
or like this: How do you check if a HTML5 audio element is loaded?