-function addOpenGraphTags (htmlStringPage: string, video: VideoInstance) {
- const previewUrl = CONFIG.WEBSERVER.URL + 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(tagName => {
- const tagValue = metaTags[tagName]
-
- tagsString += '<meta property="' + tagName + '" content="' + tagValue + '" />'
- })
+async function generateHTMLPage (req: express.Request, res: express.Response, paramLang?: string) {
+ const html = await ClientHtml.getIndexHTML(req, res, paramLang)