X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=server%2Fcontrollers%2Fclient.ts;h=c85bd8a5ed79c94d880cd260837a2f5e18287169;hb=94a5ff8a4a75d75bb9df542a39ce8769e7a7e6a4;hp=bb02f5075e1a6af3b8bc5147988c2e2ea82b461f;hpb=093237cf79ea62207b51dd632a4c4fd1f74d71fd;p=oweals%2Fpeertube.git diff --git a/server/controllers/client.ts b/server/controllers/client.ts index bb02f5075..c85bd8a5e 100644 --- a/server/controllers/client.ts +++ b/server/controllers/client.ts @@ -85,6 +85,8 @@ function addOpenGraphAndOEmbedTags (htmlStringPage: string, video: VideoModel) { ] const schemaTags = { + '@context': 'http://schema.org', + '@type': 'VideoObject', name: videoNameEscaped, description: videoDescriptionEscaped, duration: video.getActivityStreamDuration(), @@ -95,25 +97,21 @@ function addOpenGraphAndOEmbedTags (htmlStringPage: string, video: VideoModel) { } let tagsString = '' + + // Opengraph Object.keys(openGraphMetaTags).forEach(tagName => { const tagValue = openGraphMetaTags[tagName] tagsString += `` }) + // OEmbed for (const oembedLinkTag of oembedLinkTags) { tagsString += `` } - tagsString += '
' - tagsString += '

Video: ' + schemaTags.name + '

' - - Object.keys(schemaTags).forEach(tagName => { - const tagValue = schemaTags[tagName] - tagsString += `` - }) - - tagsString += '
' + // Schema.org + tagsString += `` return htmlStringPage.replace(OPENGRAPH_AND_OEMBED_COMMENT, tagsString) }