mirror of
https://github.com/iv-org/videojs-vtt-thumbnails.git
synced 2024-11-26 23:21:13 +00:00
Show mouse display on hover
This commit is contained in:
parent
d2c40e9a0d
commit
0afc4f07c0
@ -164,15 +164,15 @@ class vttThumbnailsPlugin {
|
||||
}
|
||||
|
||||
setupThumbnailElement (data) {
|
||||
const mouseDisplay = this.player.$('.vjs-mouse-display')
|
||||
this.progressBar = this.player.$('.vjs-progress-control')
|
||||
const thumbHolder = document.createElement('div')
|
||||
thumbHolder.setAttribute('class', 'vjs-vtt-thumbnail-display')
|
||||
this.progressBar.appendChild(thumbHolder)
|
||||
this.thumbnailHolder = thumbHolder
|
||||
if(mouseDisplay) {
|
||||
mouseDisplay.classList.add('vjs-hidden')
|
||||
}
|
||||
// const mouseDisplay = this.player.$('.vjs-mouse-display');
|
||||
// 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)
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
.vjs-vtt-thumbnail-display {
|
||||
position: absolute;
|
||||
transition: transform .1s, opacity .2s;
|
||||
// transition: transform .1s, opacity .2s;
|
||||
bottom: 85%;
|
||||
pointer-events: none;
|
||||
box-shadow: 0 0 7px rgba(0,0,0,.6);
|
||||
|
Loading…
Reference in New Issue
Block a user