diff --git a/src/plugins/htmlAudioPlayer/plugin.js b/src/plugins/htmlAudioPlayer/plugin.js index 1e7d47f099..b5fe063b07 100644 --- a/src/plugins/htmlAudioPlayer/plugin.js +++ b/src/plugins/htmlAudioPlayer/plugin.js @@ -105,8 +105,6 @@ class HtmlAudioPlayer { }; function setCurrentSrc(elem, options) { - elem.removeEventListener('error', onError); - unBindEvents(elem); bindEvents(elem); @@ -184,6 +182,7 @@ class HtmlAudioPlayer { elem.removeEventListener('playing', onPlaying); elem.removeEventListener('play', onPlay); elem.removeEventListener('waiting', onWaiting); + elem.removeEventListener('error', onError); // bound in htmlMediaHelper } self.stop = function (destroyPlayer) { diff --git a/src/plugins/htmlVideoPlayer/plugin.js b/src/plugins/htmlVideoPlayer/plugin.js index eeef1d5181..f3f9340189 100644 --- a/src/plugins/htmlVideoPlayer/plugin.js +++ b/src/plugins/htmlVideoPlayer/plugin.js @@ -708,6 +708,7 @@ function tryRemoveElement(elem) { videoElement.removeEventListener('click', this.onClick); videoElement.removeEventListener('dblclick', this.onDblClick); videoElement.removeEventListener('waiting', this.onWaiting); + videoElement.removeEventListener('error', this.onError); // bound in htmlMediaHelper videoElement.parentNode.removeChild(videoElement); }