Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Disable swiping on viewer video controls
Signed-off-by: John Molakvoæ <[email protected]>
Signed-off-by: nextcloud-command <[email protected]>
  • Loading branch information
skjnldsv authored and nextcloud-command committed Dec 29, 2021
commit 837ddcbb40de61492facf343498330bb9651666b
4 changes: 2 additions & 2 deletions js/viewer-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/viewer-main.js.map

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions src/components/Videos.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,17 @@ export default {
},
},

mounted() {
// Prevent swiping to the next/previous item when scrubbing the timeline or changing volume
[...this.$el.querySelectorAll('.plyr__controls__item')].forEach(control => {
if (!control?.addEventListener) {
return
}
control.addEventListener('mouseenter', this.disableSwipe)
control.addEventListener('mouseleave', this.enableSwipe)
})
},

methods: {
// Updates the dimensions of the modal
updateVideoSize() {
Expand Down