aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-08-07 14:53:01 +0200
committerChocobozzz <me@florianbigard.com>2020-08-07 14:53:01 +0200
commitb96777c380638030523bba204c4c542c892a9f54 (patch)
tree2533a8460cf47bd9644e89976d16a6bba63248ca
parent61c299eb24016dc6c76cf0c7a6fc6b05ccb654fc (diff)
downloadPeerTube-b96777c380638030523bba204c4c542c892a9f54.tar.gz
PeerTube-b96777c380638030523bba204c4c542c892a9f54.tar.zst
PeerTube-b96777c380638030523bba204c4c542c892a9f54.zip
Fix twitter embed
-rw-r--r--server/lib/client-html.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/server/lib/client-html.ts b/server/lib/client-html.ts
index 85fced10d..6bc48b5df 100644
--- a/server/lib/client-html.ts
+++ b/server/lib/client-html.ts
@@ -25,7 +25,7 @@ import { MAccountActor, MChannelActor } from '../types/models'
25 25
26type Tags = { 26type Tags = {
27 ogType: string 27 ogType: string
28 twitterCard: string 28 twitterCard: 'player' | 'summary' | 'summary_large_image'
29 schemaType: string 29 schemaType: string
30 30
31 list?: { 31 list?: {
@@ -348,6 +348,12 @@ export class ClientHtml {
348 metaTags['twitter:image:height'] = tags.image.height 348 metaTags['twitter:image:height'] = tags.image.height
349 } 349 }
350 350
351 if (tags.twitterCard === 'player') {
352 metaTags['twitter:player'] = tags.embed.url
353 metaTags['twitter:player:width'] = EMBED_SIZE.width
354 metaTags['twitter:player:height'] = EMBED_SIZE.height
355 }
356
351 return metaTags 357 return metaTags
352 } 358 }
353 359