forked from abner/for-legacy-web
feat: support Streamable embeds
parent
34ce1d1a86
commit
95d4f61d7f
|
|
@ -67,7 +67,8 @@ export default function Embed({ embed }: Props) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "Twitch":
|
case "Twitch":
|
||||||
case "Lightspeed": {
|
case "Lightspeed":
|
||||||
|
case "Streamable": {
|
||||||
mw = 1280;
|
mw = 1280;
|
||||||
mh = 720;
|
mh = 720;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,16 @@ export default function EmbedMedia({ embed, width, height }: Props) {
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
case "Streamable": {
|
||||||
|
return (
|
||||||
|
<iframe
|
||||||
|
src={`https://streamable.com/e/${embed.special.id}?loop=0`}
|
||||||
|
seamless
|
||||||
|
loading="lazy"
|
||||||
|
style={{ height }}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
if (embed.video) {
|
if (embed.video) {
|
||||||
const url = embed.video.url;
|
const url = embed.video.url;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue