bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/external-video-player/styles.js

120 lines
2.0 KiB
JavaScript
Raw Normal View History

import styled from 'styled-components';
import ReactPlayer from 'react-player';
const VideoPlayerWrapper = styled.div`
position: relative;
width: 100%;
height: 100%;
2021-12-10 22:55:37 +08:00
${({ fullscreen }) => fullscreen && `
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 99;
`}
`;
const AutoPlayWarning = styled.p`
position: absolute;
z-index: 100;
font-size: x-large;
color: white;
width: 100%;
background-color: rgba(6,23,42,0.5);
bottom: 20%;
vertical-align: middle;
text-align: center;
pointer-events: none;
`;
const VideoPlayer = styled(ReactPlayer)`
width: 100%;
height: 100%;
& > iframe {
display: flex;
flex-flow: column;
flex-grow: 1;
flex-shrink: 1;
position: relative;
overflow-x: hidden;
overflow-y: auto;
border-style: none;
border-bottom: none;
}
`;
const MobileControlsOverlay = styled.span`
position: absolute;
top:0;
left: 0;
width: 100%;
height: 100%;
background-color: transparent;
`;
const HoverToolbar = styled.div`
${({ toolbarStyle }) => toolbarStyle === 'hoverToolbar' && `
display: none;
:hover > & {
display: flex;
}
`}
${({ toolbarStyle }) => toolbarStyle === 'dontShowMobileHoverToolbar' && `
display: none;
`}
${({ toolbarStyle }) => toolbarStyle === 'showMobileHoverToolbar' && `
display: flex;
z-index: 2;
`}
`;
const ProgressBar = styled.div`
position: absolute;
bottom: 0;
height: 5px;
width: 100%;
background-color: transparent;
`;
const Loaded = styled.div`
height: 100%;
background-color: gray;
`;
const Played = styled.div`
height: 100%;
background-color: #DF2721;
`;
const ButtonsWrapper = styled.div`
position: absolute;
right: auto;
left: 0;
bottom: 0;
top: 0;
display: flex;
2022-05-03 01:56:30 +08:00
[dir="rtl"] & {
right: 0;
left : auto;
}
`;
export default {
VideoPlayerWrapper,
AutoPlayWarning,
VideoPlayer,
MobileControlsOverlay,
HoverToolbar,
ProgressBar,
Loaded,
Played,
ButtonsWrapper,
};