mirror of
https://gitea.invidious.io/iv-org/videojs-vtt-thumbnails.git
synced 2024-08-15 00:43:16 +00:00
Show mouse display on hover
This commit is contained in:
parent
d2c40e9a0d
commit
0afc4f07c0
2 changed files with 5 additions and 5 deletions
|
@ -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 a new issue