Fix twitter embed
This commit is contained in:
parent
61c299eb24
commit
b96777c380
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue