diff options
author | Chocobozzz <me@florianbigard.com> | 2022-01-11 11:26:35 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-01-11 11:26:35 +0100 |
commit | f1a0555a88db9ade2b073a2e4dc73c4a6176c8a0 (patch) | |
tree | e1f73376527152fb9ac92447a826bccc9e8f0dd5 /client/src/assets/player/bezels | |
parent | ba9eef5f628764aed6183135e669b17741d24d7a (diff) | |
download | PeerTube-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.ts | 4 |
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 @@ | |||
1 | import videojs from 'video.js' | 1 | import videojs from 'video.js' |
2 | import { isMobile } from '../utils' | ||
2 | 3 | ||
3 | function getPauseBezel () { | 4 | function 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() |