1
0
Fork 0

Focus player on video loading

This commit is contained in:
Chocobozzz 2019-11-28 11:06:02 +01:00
parent 3062112200
commit d275e75453
No known key found for this signature in database
GPG key ID: 583A612D890159BE
2 changed files with 3 additions and 0 deletions

View file

@ -477,6 +477,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
this.zone.runOutsideAngular(async () => {
this.player = await PeertubePlayerManager.initialize(mode, options, player => this.player = player)
this.player.focus()
this.player.on('customError', ({ err }: { err: any }) => this.handleError(err))

View file

@ -329,6 +329,8 @@ class SettingsMenuItem extends MenuItem {
}
setMargin () {
if (!this.size) return
const [ width ] = this.size
this.settingsSubMenuEl_.style.marginRight = `-${width}px`