diff options
author | Chocobozzz <me@florianbigard.com> | 2022-06-28 14:04:03 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-06-28 14:11:10 +0200 |
commit | bd2b51be4b29e6c3c72d8715164cde672bd41186 (patch) | |
tree | f3d54d1a49dffacd073dedc288fa8f7c2e7f7683 /client/src/standalone/videos | |
parent | 9f4109e263be961ab0b210fcbc003a8c78f5b9fe (diff) | |
download | PeerTube-bd2b51be4b29e6c3c72d8715164cde672bd41186.tar.gz PeerTube-bd2b51be4b29e6c3c72d8715164cde672bd41186.tar.zst PeerTube-bd2b51be4b29e6c3c72d8715164cde672bd41186.zip |
Put instance name in embed button
Diffstat (limited to 'client/src/standalone/videos')
-rw-r--r-- | client/src/standalone/videos/embed.scss | 19 | ||||
-rw-r--r-- | client/src/standalone/videos/embed.ts | 2 | ||||
-rw-r--r-- | client/src/standalone/videos/shared/player-manager-options.ts | 8 |
3 files changed, 9 insertions, 20 deletions
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 { | |||
40 | .vjs-poster { | 40 | .vjs-poster { |
41 | background-size: 100% auto; | 41 | background-size: 100% auto; |
42 | } | 42 | } |
43 | |||
44 | @media screen and (max-width: 350px) { | ||
45 | .vjs-play-control { | ||
46 | padding: 0 5px !important; | ||
47 | width: 25px !important; | ||
48 | } | ||
49 | |||
50 | .vjs-volume-control { | ||
51 | display: none !important; | ||
52 | } | ||
53 | |||
54 | .vjs-volume-panel { | ||
55 | width: 26px !important; | ||
56 | } | ||
57 | |||
58 | .vjs-peertube-link { | ||
59 | padding: 0; | ||
60 | } | ||
61 | } | ||
62 | } | 43 | } |
63 | 44 | ||
64 | #error-block { | 45 | #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 { | |||
196 | captionsResponse, | 196 | captionsResponse, |
197 | alreadyHadPlayer, | 197 | alreadyHadPlayer, |
198 | translations, | 198 | translations, |
199 | serverConfig: this.config, | ||
200 | |||
199 | onVideoUpdate: (uuid: string) => this.loadVideoAndBuildPlayer(uuid), | 201 | onVideoUpdate: (uuid: string) => this.loadVideoAndBuildPlayer(uuid), |
200 | 202 | ||
201 | playlistTracker: this.playlistTracker, | 203 | 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 { | |||
148 | captionsResponse: Response | 148 | captionsResponse: Response |
149 | live?: LiveVideo | 149 | live?: LiveVideo |
150 | 150 | ||
151 | serverConfig: HTMLServerConfig | ||
152 | |||
151 | alreadyHadPlayer: boolean | 153 | alreadyHadPlayer: boolean |
152 | 154 | ||
153 | translations: Translations | 155 | translations: Translations |
@@ -163,7 +165,8 @@ export class PlayerManagerOptions { | |||
163 | alreadyHadPlayer, | 165 | alreadyHadPlayer, |
164 | translations, | 166 | translations, |
165 | playlistTracker, | 167 | playlistTracker, |
166 | live | 168 | live, |
169 | serverConfig | ||
167 | } = options | 170 | } = options |
168 | 171 | ||
169 | const videoCaptions = await this.buildCaptions(captionsResponse, translations) | 172 | const videoCaptions = await this.buildCaptions(captionsResponse, translations) |
@@ -205,7 +208,10 @@ export class PlayerManagerOptions { | |||
205 | 208 | ||
206 | videoDuration: video.duration, | 209 | videoDuration: video.duration, |
207 | enableHotkeys: true, | 210 | enableHotkeys: true, |
211 | |||
208 | peertubeLink: this.peertubeLink, | 212 | peertubeLink: this.peertubeLink, |
213 | instanceName: serverConfig.instance.name, | ||
214 | |||
209 | poster: window.location.origin + video.previewPath, | 215 | poster: window.location.origin + video.previewPath, |
210 | theaterButton: false, | 216 | theaterButton: false, |
211 | 217 | ||