Sử dụng sự kiện oncanplaythrough để preload video hoàn toàn. Bạn có thể thử chạy mã sau.
Ví dụ
<!DOCTYPE html> <html> <body> <video id="myVideo" width="400" height="200" controls oncanplaythrough="display()"> <source src="/html5/foo.ogg" type="video/ogg" /> <source src="/html5/foo.mp4" type="video/mp4" /> Trình duyệt của bạn không hỗ trợ phần tử video. </video> <script> function display() { alert("Có thể phát mà không cần đợi buffering."); } </script> </body> </html>