aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/assets')
-rw-r--r--client/src/assets/player/peertube-plugin.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/client/src/assets/player/peertube-plugin.ts b/client/src/assets/player/peertube-plugin.ts
index 0121e87d7..f03553184 100644
--- a/client/src/assets/player/peertube-plugin.ts
+++ b/client/src/assets/player/peertube-plugin.ts
@@ -126,6 +126,8 @@ class PeerTubePlugin extends Plugin {
126 this.initCaptions() 126 this.initCaptions()
127 127
128 this.listenControlBarMouse() 128 this.listenControlBarMouse()
129
130 this.listenFullScreenChange()
129 } 131 }
130 132
131 private runViewAdd () { 133 private runViewAdd () {
@@ -198,6 +200,12 @@ class PeerTubePlugin extends Plugin {
198 return fetch(url, { method: 'PUT', body, headers }) 200 return fetch(url, { method: 'PUT', body, headers })
199 } 201 }
200 202
203 private listenFullScreenChange () {
204 this.player.on('fullscreenchange', () => {
205 if (this.player.isFullscreen()) this.player.focus()
206 })
207 }
208
201 private listenControlBarMouse () { 209 private listenControlBarMouse () {
202 this.player.controlBar.on('mouseenter', () => { 210 this.player.controlBar.on('mouseenter', () => {
203 this.mouseInControlBar = true 211 this.mouseInControlBar = true