aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/bezels
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-01-11 11:26:35 +0100
committerChocobozzz <me@florianbigard.com>2022-01-11 11:26:35 +0100
commitf1a0555a88db9ade2b073a2e4dc73c4a6176c8a0 (patch)
treee1f73376527152fb9ac92447a826bccc9e8f0dd5 /client/src/assets/player/bezels
parentba9eef5f628764aed6183135e669b17741d24d7a (diff)
downloadPeerTube-f1a0555a88db9ade2b073a2e4dc73c4a6176c8a0.tar.gz
PeerTube-f1a0555a88db9ade2b073a2e4dc73c4a6176c8a0.tar.zst
PeerTube-f1a0555a88db9ade2b073a2e4dc73c4a6176c8a0.zip
Add player controls on mobile
Diffstat (limited to 'client/src/assets/player/bezels')
-rw-r--r--client/src/assets/player/bezels/pause-bezel.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/client/src/assets/player/bezels/pause-bezel.ts b/client/src/assets/player/bezels/pause-bezel.ts
index 886574380..315964311 100644
--- a/client/src/assets/player/bezels/pause-bezel.ts
+++ b/client/src/assets/player/bezels/pause-bezel.ts
@@ -1,4 +1,5 @@
1import videojs from 'video.js' 1import videojs from 'video.js'
2import { isMobile } from '../utils'
2 3
3function getPauseBezel () { 4function getPauseBezel () {
4 return ` 5 return `
@@ -37,6 +38,9 @@ class PauseBezel extends Component {
37 constructor (player: videojs.Player, options?: videojs.ComponentOptions) { 38 constructor (player: videojs.Player, options?: videojs.ComponentOptions) {
38 super(player, options) 39 super(player, options)
39 40
41 // Hide bezels on mobile since we already have our mobile overlay
42 if (isMobile()) return
43
40 player.on('pause', (_: any) => { 44 player.on('pause', (_: any) => {
41 if (player.seeking() || player.ended()) return 45 if (player.seeking() || player.ended()) return
42 this.container.innerHTML = getPauseBezel() 46 this.container.innerHTML = getPauseBezel()