Open fluffy-critter opened 3 years ago
I must have missed this issue, you are correct it currently only falls back to the image. Do you have some examples of how best to display media?
I believe with player cards it just provides you a URL to embed via iframe, and it's up to the card provider to provide the ideal experience.
To use the example in the URL I provided above, here's the relevant OpenGraph:
<meta property="og:video"
content="https://bandcamp.com/EmbeddedPlayer/v=2/album=1223510543/size=large/tracklist=false/artwork=small/">
<meta property="og:video:secure_url"
content="https://bandcamp.com/EmbeddedPlayer/v=2/album=1223510543/size=large/tracklist=false/artwork=small/">
<meta property="og:video:type" content="text/html">
<meta property="og:video:height" content="120">
<meta property="og:video:width" content="400">
and if you just do the naive thing and do something like:
<iframe width="400" height="120" src="https://bandcamp.com/EmbeddedPlayer/v=2/album=1223510543/size=large/tracklist=false/artwork=small/"><a href="https://sockpuppet.bandcamp.com/album/novembeat-2020">Novembeat 2020, by Sockpuppet</a></iframe>
you get a perfectly serviceable player.
I don't know how universal that is though, given the og:video:type
. Presumably if you get something other than text/html
there you'd want to use a <video>
tag instead, or something.
Hi, I'd really like to use this library but one of the sites I want to embed content from, Bandcamp, isn't seemingly supported. For example, when trying to unfurl one of my albums:
From what I can tell (having not delved too deeply into the code) it seems that the "player" card data is being ignored, and it's falling back to using just the image. Would it be possible to add support for player cards as well?