More tests, fix bug
This commit is contained in:
@@ -63,14 +63,8 @@ export function getEmbedData(embed: Embed, images: Map<string, Metadata>) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const player = parseEmbedPlayerFromUrl(embed.view.external.uri)
|
const player = parseEmbedPlayerFromUrl(embed.view.external.uri)
|
||||||
if (player.type === 'giphy_gif') {
|
if (player) {
|
||||||
images.set(player.playerUri, {
|
if (['giphy_gif', 'tenor_gif'].includes(player.type)) {
|
||||||
aspectRatio: {
|
|
||||||
width: 1000,
|
|
||||||
height: 1000,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
} else if (player.type === 'tenor_gif') {
|
|
||||||
images.set(player.playerUri, {
|
images.set(player.playerUri, {
|
||||||
aspectRatio: {
|
aspectRatio: {
|
||||||
width: 1000,
|
width: 1000,
|
||||||
@@ -78,6 +72,7 @@ export function getEmbedData(embed: Embed, images: Map<string, Metadata>) {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
case 'video': {
|
case 'video': {
|
||||||
|
|||||||
@@ -20,12 +20,30 @@ img {
|
|||||||
<img src="http://localhost:3000/profile/test-all-embeds-a.bsky.social/post/3lkch7rnmqs23?mat=1" />
|
<img src="http://localhost:3000/profile/test-all-embeds-a.bsky.social/post/3lkch7rnmqs23?mat=1" />
|
||||||
<h3>Image w/ label</h3>
|
<h3>Image w/ label</h3>
|
||||||
<img src="http://localhost:3000/profile/test-all-embeds-a.bsky.social/post/3lkchac5lbs23?mat=1" />
|
<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>
|
<h3>Video</h3>
|
||||||
<img src="http://localhost:3000/profile/test-all-embeds-a.bsky.social/post/3lkchd5laes23?mat=1" />
|
<img src="http://localhost:3000/profile/test-all-embeds-a.bsky.social/post/3lkchd5laes23?mat=1" />
|
||||||
<h3>Video w/ label</h3>
|
<h3>Video w/ label</h3>
|
||||||
<img src="http://localhost:3000/profile/test-all-embeds-a.bsky.social/post/3lkchdnqmzc23?mat=1" />
|
<img src="http://localhost:3000/profile/test-all-embeds-a.bsky.social/post/3lkchdnqmzc23?mat=1" />
|
||||||
<h3>GIF</h3>
|
<h3>GIF</h3>
|
||||||
<img src="http://localhost:3000/profile/test-all-embeds-a.bsky.social/post/3lkchef5c2c23?mat=1" />
|
<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>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user