diff options
-rw-r--r-- | client/src/app/videos/video-watch/video-watch.component.ts | 2 | ||||
-rw-r--r-- | server/controllers/client.ts | 13 |
2 files changed, 2 insertions, 13 deletions
diff --git a/client/src/app/videos/video-watch/video-watch.component.ts b/client/src/app/videos/video-watch/video-watch.component.ts index 104ba0db6..05a2c296c 100644 --- a/client/src/app/videos/video-watch/video-watch.component.ts +++ b/client/src/app/videos/video-watch/video-watch.component.ts | |||
@@ -321,7 +321,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
321 | this.metaService.setTag('og:description', this.video.description) | 321 | this.metaService.setTag('og:description', this.video.description) |
322 | this.metaService.setTag('description', this.video.description) | 322 | this.metaService.setTag('description', this.video.description) |
323 | 323 | ||
324 | this.metaService.setTag('og:image', this.video.thumbnailPath) | 324 | this.metaService.setTag('og:image', this.video.previewPath) |
325 | 325 | ||
326 | this.metaService.setTag('og:duration', this.video.duration.toString()) | 326 | this.metaService.setTag('og:duration', this.video.duration.toString()) |
327 | 327 | ||
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 = { |