Update Wavlake embed URL, add support for album & artist links (#439)
* Update wavlake embed url * Make regex more explicit, remove allow from iframe * Prettify changes
This commit is contained in:
@ -1,14 +1,13 @@
|
||||
const WavlakeEmbed = ({ link }: { link: string }) => {
|
||||
const convertedUrl = link.replace(/\/(track)\/([a-zA-Z0-9]+)/, "/embed/$1/$2");
|
||||
const convertedUrl = link.replace("player.wavlake.com", "embed.wavlake.com");
|
||||
|
||||
return (
|
||||
<iframe
|
||||
style={{ borderRadius: 12 }}
|
||||
src={convertedUrl}
|
||||
width="100%"
|
||||
height="360"
|
||||
height="380"
|
||||
frameBorder="0"
|
||||
allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture"
|
||||
loading="lazy"></iframe>
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user