mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-20 01:28:57 +02:00
Merge pull request #1003 from benonymity/playerSwipeBack
Disable iOS swipeBack in fullscreen audio player
This commit is contained in:
commit
86096df1a4
1 changed files with 5 additions and 1 deletions
|
@ -633,6 +633,10 @@ export default {
|
||||||
},
|
},
|
||||||
touchstart(e) {
|
touchstart(e) {
|
||||||
if (!this.showFullscreen || !e.changedTouches) return
|
if (!this.showFullscreen || !e.changedTouches) return
|
||||||
|
if (e.pageX < 20) {
|
||||||
|
e.preventDefault()
|
||||||
|
e.stopImmediatePropagation()
|
||||||
|
}
|
||||||
|
|
||||||
this.touchStartY = e.changedTouches[0].screenY
|
this.touchStartY = e.changedTouches[0].screenY
|
||||||
if (this.touchStartY > window.innerHeight / 3) {
|
if (this.touchStartY > window.innerHeight / 3) {
|
||||||
|
@ -856,7 +860,7 @@ export default {
|
||||||
window.addEventListener('resize', this.screenOrientationChange)
|
window.addEventListener('resize', this.screenOrientationChange)
|
||||||
|
|
||||||
this.$eventBus.$on('minimize-player', this.minimizePlayerEvt)
|
this.$eventBus.$on('minimize-player', this.minimizePlayerEvt)
|
||||||
document.body.addEventListener('touchstart', this.touchstart)
|
document.body.addEventListener('touchstart', this.touchstart, { passive: false })
|
||||||
document.body.addEventListener('touchend', this.touchend)
|
document.body.addEventListener('touchend', this.touchend)
|
||||||
document.body.addEventListener('touchmove', this.touchmove)
|
document.body.addEventListener('touchmove', this.touchmove)
|
||||||
this.$nextTick(this.init)
|
this.$nextTick(this.init)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue