mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 17:01:20 -08:00
fix: ensure video element loads correctly on destroy
This commit is contained in:
1 parent
0044053348
commit
b6d0c07f8c
1 file changed
+1
@@ -205,6 +205,7 @@ export default class Artplayer extends Emitter {
|
|||||||
destroy(removeHtml = true) {
|
destroy(removeHtml = true) {
|
||||||
if (Artplayer.REMOVE_SRC_WHEN_DESTROY) {
|
if (Artplayer.REMOVE_SRC_WHEN_DESTROY) {
|
||||||
this.video.removeAttribute('src')
|
this.video.removeAttribute('src')
|
||||||
|
this.video.load()
|
||||||
}
|
}
|
||||||
this.events.destroy()
|
this.events.destroy()
|
||||||
this.template.destroy(removeHtml)
|
this.template.destroy(removeHtml)
|
||||||
|
|||||||
Reference in new issue
Block a user