constructor (player: videojs.Player, options: videojs.PlayerOptions) {
super(player, options)
- this.peerTubeMobileButtons = player.addChild('PeerTubeMobileButtons') as PeerTubeMobileButtons
+ this.peerTubeMobileButtons = player.addChild('PeerTubeMobileButtons', { reportTouchActivity: false }) as PeerTubeMobileButtons
if (videojs.browser.IS_ANDROID && screen.orientation) {
this.handleFullscreenRotation()
private initTouchStartEvents () {
const handleTouchStart = (event: TouchEvent) => {
- event.stopPropagation()
-
if (this.tapTimeout) {
clearTimeout(this.tapTimeout)
this.tapTimeout = undefined
handleTouchStart(event)
})
- this.peerTubeMobileButtons.on('touchstart', handleTouchStart)
+ this.peerTubeMobileButtons.el().addEventListener('touchstart', (event: TouchEvent) => {
+ // Prevent mousemove/click events firing on the player, that conflict with our user active logic
+ event.preventDefault()
+
+ handleTouchStart(event)
+ }, { passive: false })
}
private onDoubleTap (event: TouchEvent) {
this.peerTubeMobileButtons.displayFastSeek(this.seekAmount)
this.scheduleSetCurrentTime()
-
}
private findPlayerTarget (target: HTMLElement): HTMLElement {