Fix bug on mobile devices where mouse time indicator not available

This commit is contained in:
Chris Boustead 2018-05-17 17:47:51 -04:00
parent 00251ba9de
commit 73cf66f83f
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "videojs-vtt-thumbnails",
"version": "0.0.10",
"version": "0.0.11",
"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

@ -167,7 +167,9 @@ class vttThumbnailsPlugin {
thumbHolder.setAttribute('class', 'vjs-vtt-thumbnail-display')
this.progressBar.appendChild(thumbHolder)
this.thumbnailHolder = thumbHolder
mouseDisplay.classList.add('vjs-hidden')
if(mouseDisplay) {
mouseDisplay.classList.add('vjs-hidden')
}
this.registeredEvents.progressBarMouseEnter = () => { return this.onBarMouseenter() };
this.registeredEvents.progressBarMouseLeave = () => { return this.onBarMouseleave() };
this.progressBar.addEventListener('mouseenter', this.registeredEvents.progressBarMouseEnter)