'use client'
import {useState, forwardRef} from 'react'
import PropTypes from 'prop-types'
import Fab from '@mui/material/Fab'
import Dialog from '@mui/material/Dialog'
import Slide from '@mui/material/Slide'
import Box from '@mui/material/Box'
import IconButton from '@mui/material/IconButton'
import Typography from '@mui/material/Typography'
import Tooltip from '@mui/material/Tooltip'
import useMediaQuery from '@mui/material/useMediaQuery'
import {useTheme} from '@mui/material/styles'
import MicIcon from '@mui/icons-material/Mic'
import CloseIcon from '@mui/icons-material/Close'
const SlideUp = forwardRef(function SlideUp(props, ref) {
return
})
function toEmbedUrl(url) {
try {
const u = new URL(url)
const match = u.pathname.match(/\/(?:videos\/watch|w)\/([^/?#]+)/)
if (match) {
return `${u.origin}/videos/embed/${match[1]}?title=0&warningTitle=0&peertubeLink=0&controlBar=1`
}
return url
} catch {
return url
}
}
export default function KaraokeModal({url, titre, artistes}) {
const [open, setOpen] = useState(false)
const theme = useTheme()
const isMobile = useMediaQuery(theme.breakpoints.down('sm'))
return (
<>
setOpen(true)}
sx={{
position: 'fixed',
bottom: {xs: 24, sm: 32},
right: {xs: 24, sm: 32},
zIndex: 10,
}}
>
>
)
}
KaraokeModal.propTypes = {
url: PropTypes.string.isRequired,
titre: PropTypes.string,
artistes: PropTypes.array,
}