diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts index c78f5b9a2..80aa8ebe4 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts @@ -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)) diff --git a/client/src/assets/player/videojs-components/settings-menu-item.ts b/client/src/assets/player/videojs-components/settings-menu-item.ts index 85172a18c..84d394c0e 100644 --- a/client/src/assets/player/videojs-components/settings-menu-item.ts +++ b/client/src/assets/player/videojs-components/settings-menu-item.ts @@ -329,6 +329,8 @@ class SettingsMenuItem extends MenuItem { } setMargin () { + if (!this.size) return + const [ width ] = this.size this.settingsSubMenuEl_.style.marginRight = `-${width}px`