Fix twitter embed

pull/3047/head
Chocobozzz 2020-08-07 14:53:01 +02:00
parent 61c299eb24
commit b96777c380
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 7 additions and 1 deletions

View File

@ -25,7 +25,7 @@ import { MAccountActor, MChannelActor } from '../types/models'
type Tags = {
ogType: string
twitterCard: string
twitterCard: 'player' | 'summary' | 'summary_large_image'
schemaType: string
list?: {
@ -348,6 +348,12 @@ export class ClientHtml {
metaTags['twitter:image:height'] = tags.image.height
}
if (tags.twitterCard === 'player') {
metaTags['twitter:player'] = tags.embed.url
metaTags['twitter:player:width'] = EMBED_SIZE.width
metaTags['twitter:player:height'] = EMBED_SIZE.height
}
return metaTags
}