How to properly unload/destroy a VIDEO element

后端 未结 15 2139
闹比i
闹比i 2020-12-04 07:58

I\'m working on a realtime media browsing/playback application that uses objects in the browser for playback, when available.

I\'m using a

15条回答
  •  清歌不尽
    2020-12-04 08:23

    Just to clarify for anyone trying this later, the solution was this: (confirmed with h264 videos in Safari 5.0, untested in FF/opera yet)

    $(container_selector).children().filter("video").each(function(){
        this.pause();
        delete(this);
        $(this).remove();
    });
    $(container_selector).empty();
    

提交回复
热议问题