Remove thumb holder on reset/detach

This commit is contained in:
Chris Boustead 2017-11-15 16:54:31 -05:00
parent 6ac730a5fc
commit d75c370d0e
2 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{
"name": "videojs-vtt-thumbnails",
"version": "0.0.4",
"version": "0.0.5",
"description": "Display thumnails on progress bar hover, driven by external VTT files.",
"main": "dist/videojs-vtt-thumbnails.cjs.js",
"module": "dist/videojs-vtt-thumbnails.es.js",

View File

@ -84,6 +84,7 @@ class vttThumbnailsPlugin {
}
resetPlugin() {
this.thumbnailHolder.parentNode.removeChild(this.thumbnailHolder);
this.progressBar.removeEventListener('mouseenter', this.registeredEvents.progressBarMouseEnter);
this.progressBar.removeEventListener('mouseleave', this.registeredEvents.progressBarMouseLeave);
this.progressBar.removeEventListener('mousemove', this.registeredEvents.progressBarMouseMove);