How to properly unload/destroy a VIDEO element

后端 未结 15 2150
闹比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:18

    This is what I did to solve this problem. I created 2 video elements (video1 & video2). After finished using video1, get the source(src) attribute value and then remove video1 from DOM.

    Then set video2 source (src) to whatever value you got from video1.

    Do not use stream from video1 as it is cached in memory.

    Hope this will help.

提交回复
热议问题