I have installed the React-Player
module and it works great. However, I am having some issues with trying to set the player inside an Element that will make it act like a floating player which will display across my application, no matter which page I navigate to.
return (
<PageContainer maxWidth="xl">
<Table
config={{...groupsTable, label: page} }
onActions={getAction}
processData={groupsCb}
reload={reload}
setReload={setReload}
props={{
params: {
_id: urlParams.id,
},
}}
/>
{showPlayer ?
<div className="player-wrapper">
<Button onClick={closePlayer}>Close</Button>
<ReactPlayer url={currentVideo} muted={true} controls={true} pip={true} playing={false} />
</div> : null}
<Create onClick={createNewGroup}/>`your text`
</PageContainer>
)
`
Here you see that I have wrapped the player in a div with a className
of "player-wrapper", but my CSS is not doing what I want it to do....
Would there be a better way to allow for the video to start off in the right-hand corner and be in its own element so to speak and then be visible throughout the application as I navigate?
CSS:
.player-wrapper {
position: fixed;
width: 450px;
height: 300px;
bottom: 40px;
right: 40px;
background: #000;
}