fix youtube music embeds

This commit is contained in:
hzrd149 2023-02-07 17:04:18 -06:00
parent 6f8da48d43
commit 9ca18b1659

View File

@ -46,14 +46,15 @@ const embeds: {
{ {
regexp: /https?:\/\/music\.youtube\.com\/watch\?v=(\w+)[^\s]+/, regexp: /https?:\/\/music\.youtube\.com\/watch\?v=(\w+)[^\s]+/,
render: (match) => ( render: (match) => (
<iframe <AspectRatio ratio={16 / 10} maxWidth="30rem">
width="480" <iframe
height="360" width="100%"
src={`https://youtube.com/embed/${match[1]}`} src={`https://youtube.com/embed/${match[1]}`}
frameBorder="0" frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
allowFullScreen allowFullScreen
></iframe> ></iframe>
</AspectRatio>
), ),
}, },
// Tidal // Tidal