mirror of https://github.com/Chocobozzz/PeerTube
Fix twitter embed
parent
61c299eb24
commit
b96777c380
|
@ -25,7 +25,7 @@ import { MAccountActor, MChannelActor } from '../types/models'
|
||||||
|
|
||||||
type Tags = {
|
type Tags = {
|
||||||
ogType: string
|
ogType: string
|
||||||
twitterCard: string
|
twitterCard: 'player' | 'summary' | 'summary_large_image'
|
||||||
schemaType: string
|
schemaType: string
|
||||||
|
|
||||||
list?: {
|
list?: {
|
||||||
|
@ -348,6 +348,12 @@ export class ClientHtml {
|
||||||
metaTags['twitter:image:height'] = tags.image.height
|
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
|
return metaTags
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue