mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-05 01:17:22 +00:00
Player: add the singleWindow option
This commit is contained in:
parent
7240be1120
commit
18da26dc20
4 changed files with 45 additions and 18 deletions
|
|
@ -7,7 +7,9 @@ import './PlayerView.css'
|
|||
|
||||
const decode = encodedUrl => decodeURIComponent(encodedUrl)
|
||||
|
||||
export default function ({ setTheme, theme, encodedUrl }) {
|
||||
export default function ({
|
||||
setTheme, theme, encodedUrl, singleWindow
|
||||
}) {
|
||||
useEffect(() => setTheme(theme), [theme])
|
||||
|
||||
const [targetUrl, setTargetUrl] = useState(decode(encodedUrl))
|
||||
|
|
@ -18,7 +20,9 @@ export default function ({ setTheme, theme, encodedUrl }) {
|
|||
|
||||
return (
|
||||
<main>
|
||||
<UrlPlayer url={targetUrl} />
|
||||
<UrlPlayer {...{
|
||||
url: targetUrl,
|
||||
singleWindow}}/>
|
||||
</main>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue