From bd2b51be4b29e6c3c72d8715164cde672bd41186 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 28 Jun 2022 14:04:03 +0200 Subject: Put instance name in embed button --- client/src/standalone/videos/embed.scss | 19 ------------------- client/src/standalone/videos/embed.ts | 2 ++ .../videos/shared/player-manager-options.ts | 8 +++++++- 3 files changed, 9 insertions(+), 20 deletions(-) (limited to 'client/src/standalone') diff --git a/client/src/standalone/videos/embed.scss b/client/src/standalone/videos/embed.scss index 8c20bae79..3631ea7e6 100644 --- a/client/src/standalone/videos/embed.scss +++ b/client/src/standalone/videos/embed.scss @@ -40,25 +40,6 @@ body { .vjs-poster { background-size: 100% auto; } - - @media screen and (max-width: 350px) { - .vjs-play-control { - padding: 0 5px !important; - width: 25px !important; - } - - .vjs-volume-control { - display: none !important; - } - - .vjs-volume-panel { - width: 26px !important; - } - - .vjs-peertube-link { - padding: 0; - } - } } #error-block { diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts index 0a2b0ccbd..c15d4db17 100644 --- a/client/src/standalone/videos/embed.ts +++ b/client/src/standalone/videos/embed.ts @@ -196,6 +196,8 @@ export class PeerTubeEmbed { captionsResponse, alreadyHadPlayer, translations, + serverConfig: this.config, + onVideoUpdate: (uuid: string) => this.loadVideoAndBuildPlayer(uuid), playlistTracker: this.playlistTracker, diff --git a/client/src/standalone/videos/shared/player-manager-options.ts b/client/src/standalone/videos/shared/player-manager-options.ts index 144d74319..f3bd46a69 100644 --- a/client/src/standalone/videos/shared/player-manager-options.ts +++ b/client/src/standalone/videos/shared/player-manager-options.ts @@ -148,6 +148,8 @@ export class PlayerManagerOptions { captionsResponse: Response live?: LiveVideo + serverConfig: HTMLServerConfig + alreadyHadPlayer: boolean translations: Translations @@ -163,7 +165,8 @@ export class PlayerManagerOptions { alreadyHadPlayer, translations, playlistTracker, - live + live, + serverConfig } = options const videoCaptions = await this.buildCaptions(captionsResponse, translations) @@ -205,7 +208,10 @@ export class PlayerManagerOptions { videoDuration: video.duration, enableHotkeys: true, + peertubeLink: this.peertubeLink, + instanceName: serverConfig.instance.name, + poster: window.location.origin + video.previewPath, theaterButton: false, -- cgit v1.2.3