diff --git a/packages/xgplayer/src/mediaProxy.js b/packages/xgplayer/src/mediaProxy.js index 7e3b37d66..4c5b9303b 100644 --- a/packages/xgplayer/src/mediaProxy.js +++ b/packages/xgplayer/src/mediaProxy.js @@ -376,7 +376,7 @@ class MediaProxy extends EventEmitter { let _e = this.media.error || error const type = _e.code ? ERROR_TYPE_MAP[_e.code] : 'other' let message = _e.message - if (!this.media.currentSrc) { + if (!(this.media.currentSrc || this.media.srcObject)) { message = 'empty_src' _e = { code: 6, diff --git a/packages/xgplayer/src/plugins/controls/index.js b/packages/xgplayer/src/plugins/controls/index.js index 7be222f99..7142a8d3e 100644 --- a/packages/xgplayer/src/plugins/controls/index.js +++ b/packages/xgplayer/src/plugins/controls/index.js @@ -174,6 +174,10 @@ class Controls extends Plugin { this.unbind('mouseenter', this.onMouseEnter) this.unbind('mouseleave', this.onMouseLeave) } + this.left = null + this.center = null + this.right = null + this.innerRoot = null } render () {