Focus player on video loading
This commit is contained in:
parent
3062112200
commit
d275e75453
2 changed files with 3 additions and 0 deletions
|
@ -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))
|
||||
|
||||
|
|
|
@ -329,6 +329,8 @@ class SettingsMenuItem extends MenuItem {
|
|||
}
|
||||
|
||||
setMargin () {
|
||||
if (!this.size) return
|
||||
|
||||
const [ width ] = this.size
|
||||
|
||||
this.settingsSubMenuEl_.style.marginRight = `-${width}px`
|
||||
|
|
Loading…
Reference in a new issue