-function addOpenGraphAndOEmbedTags (htmlStringPage: string, video: VideoInstance) {
- const previewUrl = CONFIG.WEBSERVER.URL + STATIC_PATHS.PREVIEWS + video.getPreviewName()
- const videoUrl = CONFIG.WEBSERVER.URL + '/videos/watch/' + video.uuid
-
- const videoName = escapeHTML(video.name)
- const videoDescription = escapeHTML(video.description)
-
- const openGraphMetaTags = {
- 'og:type': 'video',
- 'og:title': videoName,
- 'og:image': previewUrl,
- 'og:url': videoUrl,
- 'og:description': videoDescription,
-
- 'name': videoName,
- 'description': videoDescription,
- 'image': previewUrl,
-
- 'twitter:card': 'summary_large_image',
- 'twitter:site': '@Chocobozzz',
- 'twitter:title': videoName,
- 'twitter:description': videoDescription,
- 'twitter:image': previewUrl
- }
-
- const oembedLinkTags = [
- {
- type: 'application/json+oembed',
- href: CONFIG.WEBSERVER.URL + '/services/oembed?url=' + encodeURIComponent(videoUrl),
- title: videoName
- }
- ]
-
- let tagsString = ''
- Object.keys(openGraphMetaTags).forEach(tagName => {
- const tagValue = openGraphMetaTags[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)