aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/client.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/client.js')
-rw-r--r--server/controllers/client.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/controllers/client.js b/server/controllers/client.js
index e3251d7e9..61e094980 100644
--- a/server/controllers/client.js
+++ b/server/controllers/client.js
@@ -31,19 +31,19 @@ module.exports = router
31// --------------------------------------------------------------------------- 31// ---------------------------------------------------------------------------
32 32
33function addOpenGraphTags (htmlStringPage, video) { 33function addOpenGraphTags (htmlStringPage, video) {
34 const videoUrl = constants.CONFIG.WEBSERVER.URL + '/videos/watch/' 34 let basePreviewUrlHttp
35 let baseUrlHttp
36 35
37 if (video.isOwned()) { 36 if (video.isOwned()) {
38 baseUrlHttp = constants.CONFIG.WEBSERVER.URL 37 basePreviewUrlHttp = constants.CONFIG.WEBSERVER.URL
39 } else { 38 } else {
40 baseUrlHttp = constants.REMOTE_SCHEME.HTTP + '://' + video.podHost 39 basePreviewUrlHttp = constants.REMOTE_SCHEME.HTTP + '://' + video.podHost
41 } 40 }
42 41
43 // We fetch the remote preview (bigger than the thumbnail) 42 // We fetch the remote preview (bigger than the thumbnail)
44 // This should not overhead the remote server since social websites put in a cache the OpenGraph tags 43 // This should not overhead the remote server since social websites put in a cache the OpenGraph tags
45 // We can't use the thumbnail because these social websites want bigger images (> 200x200 for Facebook for example) 44 // We can't use the thumbnail because these social websites want bigger images (> 200x200 for Facebook for example)
46 const previewUrl = baseUrlHttp + constants.STATIC_PATHS.PREVIEWS + video.getPreviewName() 45 const previewUrl = basePreviewUrlHttp + constants.STATIC_PATHS.PREVIEWS + video.getPreviewName()
46 const videoUrl = constants.CONFIG.WEBSERVER.URL + '/videos/watch/' + video._id
47 47
48 const metaTags = { 48 const metaTags = {
49 'og:type': 'video', 49 'og:type': 'video',