bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/audio/audio-modal/styles.js

152 lines
3.0 KiB
JavaScript
Raw Normal View History

2021-11-09 21:22:59 +08:00
import styled, { css, keyframes } from 'styled-components';
2022-02-15 04:20:50 +08:00
import Button from '/imports/ui/components/common/button/component';
import ModalSimple from '/imports/ui/components/common/modal/simple/component';
2021-11-09 21:22:59 +08:00
import { smallOnly } from '/imports/ui/stylesheets/styled-components/breakpoints';
import { colorPrimary } from '/imports/ui/stylesheets/styled-components/palette';
2021-11-09 21:22:59 +08:00
import {
mdPaddingY,
2022-06-04 02:59:22 +08:00
btnSpacing,
2021-11-09 21:22:59 +08:00
} from '/imports/ui/stylesheets/styled-components/general';
import { lineHeightComputed } from '/imports/ui/stylesheets/styled-components/typography';
const AudioOptions = styled.span`
margin-top: auto;
margin-bottom: auto;
display: flex;
justify-content: center;
`;
const AudioModalButton = styled(Button)`
i {
color: #3c5764;
}
// Modifies the audio button icon colour
& span:first-child {
display: inline-block;
2021-11-09 21:22:59 +08:00
color: #1b3c4b;
background-color: #f1f8ff;
box-shadow: none;
border: 5px solid #f1f8ff;
font-size: 3.5rem;
@media ${smallOnly} {
font-size: 2.5rem;
}
}
// When hovering over a button of class audioBtn, change the border colour of first span-child
&:hover span:first-child,
&:focus span:first-child {
border: 5px solid ${colorPrimary};
background-color: #f1f8ff;
}
// Modifies the button label text
& span:last-child {
display: block;
2021-11-09 21:22:59 +08:00
color: black;
font-size: 1rem;
font-weight: 600;
2022-06-04 02:59:22 +08:00
margin-top: ${btnSpacing};
line-height: 1.5;
2021-11-09 21:22:59 +08:00
}
`;
const AudioDial = styled(Button)`
margin: 0 auto;
margin-top: ${mdPaddingY};
display: block;
`;
const Connecting = styled.div`
margin-top: auto;
margin-bottom: auto;
font-size: 2rem;
feat(audio): rework audio join without listen only This is a rework of the audio join procedure whithout the explict listen only separation in mind. It's supposed to be used in conjunction with the transparent listen only feature so that the distinction between modes is seamless with minimal server-side impact. An abridged list of changes: - Let the user pick no input device when joining microphone while allowing them to set an input device on the fly later on - Give the user the option to join audio with no input device whenever we fail to obtain input devices, with the option to try re-enabling them on the fly later on - Add the option to open the audio settings modal (echo test et al) via the in-call device selection chevron - Rework the SFU audio bridge and its services to support adding/removing tracks on the fly without renegotiation - Rework the SFU audio bridge and its services to support a new peer role called "passive-sendrecv". That role is used by dupled peers that have no active input source on start, but might have one later on. - Remove stale PermissionsOverlay component from the audio modal - Rework how permission errors are detected using the Permissions API - Rework the local echo test so that it uses a separate media tag rather than the remote - Add new, separate dialplans that mute/hold FreeSWITCH channels on hold based on UA strings. This is orchestrated server-side via webrtc-sfu and akka-apps. The basic difference here is that channels now join in their desired state rather than waiting for client side observers to sync the state up. It also mitigates transparent listen only performance edge cases on multiple audio channels joining at the same time. The old, decoupled listen only mode is still present in code while we validate this new approach. To test this, transparentListenOnly must be enabled and listen only mode must be disable on audio join so that the user skips straight through microphone join.
2024-06-05 19:26:27 +08:00
text-align: center;
2021-11-09 21:22:59 +08:00
`;
const ellipsis = keyframes`
to {
width: 1.5em;
}
`;
const ConnectingAnimation = styled.span`
margin: auto;
display: inline-block;
width: 1.5em;
&:after {
overflow: hidden;
display: inline-block;
vertical-align: bottom;
content: "\\2026"; /* ascii code for the ellipsis character */
width: 0;
margin-left: 0.25em;
${({ animations }) => animations && css`
animation: ${ellipsis} steps(4, end) 900ms infinite;
`}
}
`;
const AudioModal = styled(ModalSimple)`
2022-10-28 01:54:34 +08:00
padding: 1rem;
2021-11-09 21:22:59 +08:00
min-height: 20rem;
`;
const BrowserWarning = styled.p`
margin: ${lineHeightComputed};
text-align: center;
padding: 0.5rem;
border-width: 3px;
border-style: solid;
border-radius: 0.25rem;
`;
const Content = styled.div`
flex-grow: 1;
display: flex;
justify-content: center;
padding: 0;
margin-top: auto;
margin-bottom: auto;
padding: 0.5rem 0;
button:first-child {
margin: 0 3rem 0 0;
[dir="rtl"] & {
margin: 0 0 0 3rem;
}
@media ${smallOnly} {
margin: 0 1rem 0 0;
[dir="rtl"] & {
margin: 0 0 0 1rem;
}
}
}
button:only-child {
margin: inherit 0 inherit inherit;
[dir="rtl"] & {
margin: inherit inherit inherit 0 !important;
}
}
`;
export default {
AudioOptions,
AudioModalButton,
AudioDial,
Connecting,
ConnectingAnimation,
AudioModal,
BrowserWarning,
Content,
};