mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-09-27 12:07:43 +02:00
add support for spotify podcast episodes
This commit is contained in:
@@ -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>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user