mirror of https://github.com/Chocobozzz/PeerTube
Focus player after fullscreen
parent
38d69d6501
commit
07d6044e21
|
@ -126,6 +126,8 @@ class PeerTubePlugin extends Plugin {
|
||||||
this.initCaptions()
|
this.initCaptions()
|
||||||
|
|
||||||
this.listenControlBarMouse()
|
this.listenControlBarMouse()
|
||||||
|
|
||||||
|
this.listenFullScreenChange()
|
||||||
}
|
}
|
||||||
|
|
||||||
private runViewAdd () {
|
private runViewAdd () {
|
||||||
|
@ -198,6 +200,12 @@ class PeerTubePlugin extends Plugin {
|
||||||
return fetch(url, { method: 'PUT', body, headers })
|
return fetch(url, { method: 'PUT', body, headers })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private listenFullScreenChange () {
|
||||||
|
this.player.on('fullscreenchange', () => {
|
||||||
|
if (this.player.isFullscreen()) this.player.focus()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
private listenControlBarMouse () {
|
private listenControlBarMouse () {
|
||||||
this.player.controlBar.on('mouseenter', () => {
|
this.player.controlBar.on('mouseenter', () => {
|
||||||
this.mouseInControlBar = true
|
this.mouseInControlBar = true
|
||||||
|
|
Loading…
Reference in New Issue