aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/client.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-02-28 09:39:08 +0100
committerChocobozzz <me@florianbigard.com>2018-02-28 09:39:08 +0100
commitacbffe9c0f2c1761fef11d49fb3da97734b000e5 (patch)
tree013a453379da3d223f1f36721354ebc238c4d065 /server/controllers/client.ts
parent7ccfb37f328f2b2c338019238e58344032d5a381 (diff)
downloadPeerTube-acbffe9c0f2c1761fef11d49fb3da97734b000e5.tar.gz
PeerTube-acbffe9c0f2c1761fef11d49fb3da97734b000e5.tar.zst
PeerTube-acbffe9c0f2c1761fef11d49fb3da97734b000e5.zip
Add max video height on mobile
Diffstat (limited to 'server/controllers/client.ts')
-rw-r--r--server/controllers/client.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/server/controllers/client.ts b/server/controllers/client.ts
index df2eee9c9..b5dc7b7ed 100644
--- a/server/controllers/client.ts
+++ b/server/controllers/client.ts
@@ -100,11 +100,12 @@ function addOpenGraphAndOEmbedTags (htmlStringPage: string, video: VideoModel) {
100 '@type': 'VideoObject', 100 '@type': 'VideoObject',
101 name: videoNameEscaped, 101 name: videoNameEscaped,
102 description: videoDescriptionEscaped, 102 description: videoDescriptionEscaped,
103 thumbnailUrl: previewUrl,
104 uploadDate: video.createdAt.toISOString(),
103 duration: video.getActivityStreamDuration(), 105 duration: video.getActivityStreamDuration(),
104 thumbnailURL: previewUrl, 106 contentUrl: videoUrl,
105 contentURL: videoUrl, 107 embedUrl: embedUrl,
106 embedURL: embedUrl, 108 interactionCount: video.views
107 uploadDate: video.createdAt
108 } 109 }
109 110
110 let tagsString = '' 111 let tagsString = ''
@@ -124,6 +125,9 @@ function addOpenGraphAndOEmbedTags (htmlStringPage: string, video: VideoModel) {
124 // Schema.org 125 // Schema.org
125 tagsString += `<script type="application/ld+json">${JSON.stringify(schemaTags)}</script>` 126 tagsString += `<script type="application/ld+json">${JSON.stringify(schemaTags)}</script>`
126 127
128 // SEO
129 tagsString += `<link rel="canonical" href="${videoUrl}" />`
130
127 return htmlStringPage.replace(OPENGRAPH_AND_OEMBED_COMMENT, tagsString) 131 return htmlStringPage.replace(OPENGRAPH_AND_OEMBED_COMMENT, tagsString)
128} 132}
129 133