add support for spotify podcast episodes

This commit is contained in:
hzrd149
2023-02-07 17:04:18 -06:00
parent a3304baed7
commit 5d3f269b43

View File

@@ -55,7 +55,7 @@ const embeds: {
}, },
// Spotify // Spotify
{ {
regexp: /https?:\/\/open\.spotify\.com\/track\/(\w+)[^\s]+/im, regexp: /https?:\/\/open\.spotify\.com\/(track|episode)\/(\w+)[^\s]+/im,
render: (match) => ( render: (match) => (
<iframe <iframe
style={{ borderRadius: "12px" }} style={{ borderRadius: "12px" }}
@@ -66,7 +66,7 @@ const embeds: {
allowFullScreen allowFullScreen
allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture"
loading="lazy" loading="lazy"
src={`https://open.spotify.com/embed/track/${match[1]}`} src={`https://open.spotify.com/embed/${match[1]}/${match[2]}`}
></iframe> ></iframe>
), ),
}, },