fix player destroy control plugins memeory leak

This commit is contained in:
李璐 2024-10-10 17:51:33 +08:00 committed by jiuyuetianjiuyuetian
parent bfbfcab29a
commit 8ef44a4d8f
2 changed files with 5 additions and 1 deletions

View File

@ -376,7 +376,7 @@ class MediaProxy extends EventEmitter {
let _e = this.media.error || error let _e = this.media.error || error
const type = _e.code ? ERROR_TYPE_MAP[_e.code] : 'other' const type = _e.code ? ERROR_TYPE_MAP[_e.code] : 'other'
let message = _e.message let message = _e.message
if (!this.media.currentSrc) { if (!(this.media.currentSrc || this.media.srcObject)) {
message = 'empty_src' message = 'empty_src'
_e = { _e = {
code: 6, code: 6,

View File

@ -174,6 +174,10 @@ class Controls extends Plugin {
this.unbind('mouseenter', this.onMouseEnter) this.unbind('mouseenter', this.onMouseEnter)
this.unbind('mouseleave', this.onMouseLeave) this.unbind('mouseleave', this.onMouseLeave)
} }
this.left = null
this.center = null
this.right = null
this.innerRoot = null
} }
render () { render () {