HTML5 video element request stay pending forever (on chrome)

后端 未结 6 1121
野性不改
野性不改 2020-11-28 04:48

I have a weird issue in Chrome.

Each time I load a element, chrome will start two HTTP request.

The first one will stay pending fo

6条回答
  •  野性不改
    2020-11-28 05:32

    I found this issue when using html5 video inside dynamic content such as carousels, to release the blocked sockets you have to unload the video source:

    var video = $('#video');
    video[0].pause();
    video.prop('src','');
    video.find('source').remove();
    video.remove();
    

    The bug claims to be fixed but I still had to do this on Chrome 42. At least I could still set preload="auto".

提交回复
热议问题