diff options
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/client.ts | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/server/controllers/client.ts b/server/controllers/client.ts index d913f81b8..1324e62cd 100644 --- a/server/controllers/client.ts +++ b/server/controllers/client.ts | |||
@@ -45,18 +45,7 @@ export { | |||
45 | // --------------------------------------------------------------------------- | 45 | // --------------------------------------------------------------------------- |
46 | 46 | ||
47 | function addOpenGraphTags (htmlStringPage: string, video: VideoInstance) { | 47 | function addOpenGraphTags (htmlStringPage: string, video: VideoInstance) { |
48 | let basePreviewUrlHttp | 48 | const previewUrl = CONFIG.WEBSERVER.URL + STATIC_PATHS.PREVIEWS + video.getPreviewName() |
49 | |||
50 | if (video.isOwned()) { | ||
51 | basePreviewUrlHttp = CONFIG.WEBSERVER.URL | ||
52 | } else { | ||
53 | basePreviewUrlHttp = REMOTE_SCHEME.HTTP + '://' + video.Author.Pod.host | ||
54 | } | ||
55 | |||
56 | // We fetch the remote preview (bigger than the thumbnail) | ||
57 | // This should not overhead the remote server since social websites put in a cache the OpenGraph tags | ||
58 | // We can't use the thumbnail because these social websites want bigger images (> 200x200 for Facebook for example) | ||
59 | const previewUrl = basePreviewUrlHttp + STATIC_PATHS.PREVIEWS + video.getPreviewName() | ||
60 | const videoUrl = CONFIG.WEBSERVER.URL + '/videos/watch/' + video.id | 49 | const videoUrl = CONFIG.WEBSERVER.URL + '/videos/watch/' + video.id |
61 | 50 | ||
62 | const metaTags = { | 51 | const metaTags = { |