Computer >> Máy Tính >  >> Lập trình >> Javascript

Làm cách nào để tránh tải lại video HTML trên cùng một trang?


Sử dụng preload =”auto” để tránh tải lại video HTML lặp lại trên cùng một trang -

<!DOCTYPE html>
<html>
   <body>
      <video width = "350" height = "200" controls = "controls" preload = "auto">
         <source src = "movie.mp4" type = "video/mp4" />
         <source src = "movie.ogg" type = "video/ogg" />
         Your browser does not support the video tag.
      </video>
   </body>
</html>