More tests, fix bug

This commit is contained in:
Eric Bailey
2025-03-16 15:25:29 -05:00
parent 116fef81e6
commit 9a8b2f9e3a
2 changed files with 27 additions and 14 deletions
+9 -14
View File
@@ -63,20 +63,15 @@ export function getEmbedData(embed: Embed, images: Map<string, Metadata>) {
})
}
const player = parseEmbedPlayerFromUrl(embed.view.external.uri)
if (player.type === 'giphy_gif') {
images.set(player.playerUri, {
aspectRatio: {
width: 1000,
height: 1000,
},
})
} else if (player.type === 'tenor_gif') {
images.set(player.playerUri, {
aspectRatio: {
width: 1000,
height: 1000,
},
})
if (player) {
if (['giphy_gif', 'tenor_gif'].includes(player.type)) {
images.set(player.playerUri, {
aspectRatio: {
width: 1000,
height: 1000,
},
})
}
}
break
}
+18
View File
@@ -20,12 +20,30 @@ img {
<img src="http://localhost:3000/profile/test-all-embeds-a.bsky.social/post/3lkch7rnmqs23?mat=1" />
<h3>Image w/ label</h3>
<img src="http://localhost:3000/profile/test-all-embeds-a.bsky.social/post/3lkchac5lbs23?mat=1" />
<h3>Image x2</h3>
<img src="http://localhost:3000/profile/test-all-embeds-a.bsky.social/post/3lkchkcokw22h?mat=1" />
<h3>Image x3</h3>
<img src="http://localhost:3000/profile/test-all-embeds-a.bsky.social/post/3lkjhqtunc22v?mat=1" />
<h3>Image x4</h3>
<img src="http://localhost:3000/profile/test-all-embeds-a.bsky.social/post/3lkjhsgb4vk2z?mat=1" />
<h3>Video</h3>
<img src="http://localhost:3000/profile/test-all-embeds-a.bsky.social/post/3lkchd5laes23?mat=1" />
<h3>Video w/ label</h3>
<img src="http://localhost:3000/profile/test-all-embeds-a.bsky.social/post/3lkchdnqmzc23?mat=1" />
<h3>GIF</h3>
<img src="http://localhost:3000/profile/test-all-embeds-a.bsky.social/post/3lkchef5c2c23?mat=1" />
<h3>List</h3>
<img src="http://localhost:3000/profile/test-all-embeds-a.bsky.social/post/3lkchgiinq22h?mat=1" />
<h3>List w/ label</h3>
<img src="http://localhost:3000/profile/test-all-embeds-a.bsky.social/post/3lkchgwpy222h?mat=1" />
<h3>List (takendown)</h3>
<img src="http://localhost:3000/profile/test-all-embeds-a.bsky.social/post/3lkchhfft722h?mat=1" />
<h3>Feed</h3>
<img src="http://localhost:3000/profile/test-all-embeds-a.bsky.social/post/3lkchj6t27k2h?mat=1" />
<h3>Feed w/ label</h3>
<img src="http://localhost:3000/profile/test-all-embeds-a.bsky.social/post/3lkchjjmgx22h?mat=1" />
<h3>Link</h3>
<img src="http://localhost:3000/profile/test-all-embeds-a.bsky.social/post/3lkchlshes22h?mat=1" />
</div>
</body>
</html>