-function addOpenGraphTags (htmlStringPage, video) {
- let basePreviewUrlHttp
-
- if (video.isOwned()) {
- basePreviewUrlHttp = CONFIG.WEBSERVER.URL
- } else {
- basePreviewUrlHttp = REMOTE_SCHEME.HTTP + '://' + video.Author.Pod.host
- }
-
- // We fetch the remote preview (bigger than the thumbnail)
- // This should not overhead the remote server since social websites put in a cache the OpenGraph tags
- // We can't use the thumbnail because these social websites want bigger images (> 200x200 for Facebook for example)
- const previewUrl = basePreviewUrlHttp + STATIC_PATHS.PREVIEWS + video.getPreviewName()
- const videoUrl = CONFIG.WEBSERVER.URL + '/videos/watch/' + video.id
-
- const metaTags = {
- 'og:type': 'video',
- 'og:title': video.name,
- 'og:image': previewUrl,
- 'og:url': videoUrl,
- 'og:description': video.description,
-
- 'name': video.name,
- 'description': video.description,
- 'image': previewUrl,
-
- 'twitter:card': 'summary_large_image',
- 'twitter:site': '@Chocobozzz',
- 'twitter:title': video.name,
- 'twitter:description': video.description,
- 'twitter:image': previewUrl
- }
-
- let tagsString = ''
- Object.keys(metaTags).forEach(function (tagName) {
- const tagValue = metaTags[tagName]
+async function generateHTMLPage (req: express.Request, res: express.Response, paramLang?: string) {
+ const html = await ClientHtml.getIndexHTML(req, res, paramLang)