aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/standalone/videos/embed.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/standalone/videos/embed.ts')
-rw-r--r--client/src/standalone/videos/embed.ts15
1 files changed, 12 insertions, 3 deletions
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts
index 054f771ab..38ff39890 100644
--- a/client/src/standalone/videos/embed.ts
+++ b/client/src/standalone/videos/embed.ts
@@ -1,4 +1,6 @@
1import './embed.scss' 1import './embed.scss'
2import '../../assets/player/dock/peertube-dock-component'
3import '../../assets/player/dock/peertube-dock-plugin'
2import videojs from 'video.js' 4import videojs from 'video.js'
3import { peertubeTranslate } from '../../../../shared/core-utils/i18n' 5import { peertubeTranslate } from '../../../../shared/core-utils/i18n'
4import { 6import {
@@ -678,15 +680,22 @@ export class PeerTubeEmbed {
678 if (!this.player.player_) return 680 if (!this.player.player_) return
679 681
680 const title = this.title ? videoInfo.name : undefined 682 const title = this.title ? videoInfo.name : undefined
681
682 const description = this.warningTitle && this.p2pEnabled 683 const description = this.warningTitle && this.p2pEnabled
683 ? '<span class="text">' + peertubeTranslate('Watching this video may reveal your IP address to others.') + '</span>' 684 ? '<span class="text">' + peertubeTranslate('Watching this video may reveal your IP address to others.') + '</span>'
684 : undefined 685 : undefined
685 686
687 const availableAvatars = videoInfo.channel.avatars.filter(a => a.width < 50)
688 const avatar = availableAvatars.length !== 0
689 ? availableAvatars[0]
690 : undefined
691
686 if (title || description) { 692 if (title || description) {
687 this.player.dock({ 693 this.player.peertubeDock({
688 title, 694 title,
689 description 695 description,
696 avatarUrl: title && avatar
697 ? avatar.path
698 : undefined
690 }) 699 })
691 } 700 }
692 } 701 }