fix: ensure video element loads correctly on destroy

This commit is contained in:
Harvey Zhao committed 2025-10-16 15:36:37 +08:00
1 parent 0044053348
commit b6d0c07f8c
1 file changed
+1
+1
View File
@@ -205,6 +205,7 @@ export default class Artplayer extends Emitter {
destroy(removeHtml = true) {
if (Artplayer.REMOVE_SRC_WHEN_DESTROY) {
this.video.removeAttribute('src')
this.video.load()
}
this.events.destroy()
this.template.destroy(removeHtml)