fix: no swipeback when audio player fullscreen

This commit is contained in:
benonymity 2023-12-22 22:34:24 -05:00
parent 793f0c05f7
commit 29086fc783

View file

@ -632,6 +632,10 @@ export default {
},
touchstart(e) {
if (!this.showFullscreen || !e.changedTouches) return
if (e.pageX < 20) {
e.preventDefault()
e.stopImmediatePropagation()
}
this.touchStartY = e.changedTouches[0].screenY
if (this.touchStartY > window.innerHeight / 3) {
@ -848,7 +852,7 @@ export default {
window.addEventListener('resize', this.screenOrientationChange)
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('touchmove', this.touchmove)
this.$nextTick(this.init)