Use player card with external videos

This commit is contained in:
dangered wolf 2023-12-08 22:21:31 -05:00
parent 7d759f8dc7
commit ee6dac00d5
No known key found for this signature in database
GPG key ID: 41E4D37680ED8B58

View file

@ -217,6 +217,7 @@ export const buildAPITwitterStatus = async (
if (status.card) {
const card = renderCard(status.card);
if (card.external_media) {
apiStatus.embed_card = 'player';
apiStatus.media.external = card.external_media;
if (apiStatus.media.external.url.match('https://www.youtube.com/embed/')) {
/* Add YouTube thumbnail URL */
@ -245,8 +246,6 @@ export const buildAPITwitterStatus = async (
height: 720
};
console.log(apiStatus.media.external)
apiStatus.embed_card = 'player';
}
}