-function addOpenGraphAndOEmbedTags (htmlStringPage: string, video: VideoModel) {
- const previewUrl = CONFIG.WEBSERVER.URL + STATIC_PATHS.PREVIEWS + video.getPreviewName()
- const videoUrl = CONFIG.WEBSERVER.URL + '/videos/watch/' + video.uuid
-
- const videoNameEscaped = escapeHTML(video.name)
- const videoDescriptionEscaped = escapeHTML(video.description)
- const embedUrl = CONFIG.WEBSERVER.URL + video.getEmbedPath()
-
- const openGraphMetaTags = {
- 'og:type': 'video',
- 'og:title': videoNameEscaped,
- 'og:image': previewUrl,
- 'og:url': videoUrl,
- 'og:description': videoDescriptionEscaped,
-
- 'og:video:url': embedUrl,
- 'og:video:secure_url': embedUrl,
- 'og:video:type': 'text/html',
- 'og:video:width': EMBED_SIZE.width,
- 'og:video:height': EMBED_SIZE.height,
-
- 'name': videoNameEscaped,
- 'description': videoDescriptionEscaped,
- 'image': previewUrl,
-
- 'twitter:card': CONFIG.SERVICES.TWITTER.WHITELISTED ? 'player' : 'summary_large_image',
- 'twitter:site': CONFIG.SERVICES.TWITTER.USERNAME,
- 'twitter:title': videoNameEscaped,
- 'twitter:description': videoDescriptionEscaped,
- 'twitter:image': previewUrl,
- 'twitter:player': embedUrl,
- 'twitter:player:width': EMBED_SIZE.width,
- 'twitter:player:height': EMBED_SIZE.height
- }