Chrome HTML5 Videos stop working if too many tabs are open - Memory issue?

后端 未结 4 1188
无人共我
无人共我 2021-01-05 08:39

I\'m using jQuery to dynamically write objects, and running videojs to init them. After I play a video, SOMETIMES when I try to play it again, it

4条回答
  •  死守一世寂寞
    2021-01-05 09:41

    Exactly how many video tags to you have? What do they look like? Do they include preload='none' attribute? Are the source videos all on the server?

    I ask because if you have more than six video tags on a single page pointing to the same source server then you could be experiencing "connection starvation":

    • Chrome allows only six open connections to a single server (based on DNS name in the URL)
    • the html5 video tag's preload attribute default value is 'auto'
    • Chrome's auto behavior is to preload some data and leave the connection open ready to pull more data for the video

    So, with more than six video tags on a single page pointing to a single server, the videos will not play. To resolve this particular problem, set the preload attribute to 'none'

提交回复
热议问题