}
private async buildDock (videoInfo: VideoDetails, configResponse: Response) {
- if (this.controls) {
- // On webtorrent fallback, player may have been disposed
- if (!this.player.player_) return
+ if (!this.controls) return
- const title = this.title ? videoInfo.name : undefined
++ // On webtorrent fallback, player may have been disposed
++ if (!this.player.player_) return
+
- const config: ServerConfig = await configResponse.json()
- const description = config.tracker.enabled && this.warningTitle
- ? '<span class="text">' + this.player.localize('Watching this video may reveal your IP address to others.') + '</span>'
- : undefined
+ const title = this.title ? videoInfo.name : undefined
- this.player.dock({
- title,
- description
- })
- }
+ const config: ServerConfig = await configResponse.json()
+ const description = config.tracker.enabled && this.warningTitle
+ ? '<span class="text">' + peertubeTranslate('Watching this video may reveal your IP address to others.') + '</span>'
+ : undefined
+
+ this.player.dock({
+ title,
+ description
+ })
}
private buildCSS () {