Skip to content

Commit

Permalink
! Fix possible to do both actions in video player by scrolling (#2989)
Browse files Browse the repository at this point in the history
"Scroll playback rate over video player" and "Skip by Scrolling Over Video Player"
  • Loading branch information
PikachuEXE authored Dec 25, 2022
1 parent 90ac5e6 commit 1a0786f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/renderer/components/ft-video-player/ft-video-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,11 @@ export default Vue.extend({
},

mouseScrollSkip: function (event) {
// Avoid doing both
if ((event.ctrlKey || event.metaKey) && this.videoPlaybackRateMouseScroll) {
return
}

// ensure that the mouse is over the player
if (event.target && (event.target.matches('.vjs-tech') || event.target.matches('.ftVideoPlayer'))) {
event.preventDefault()
Expand Down

0 comments on commit 1a0786f

Please sign in to comment.