Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(subtitles): position part2

Hristo Terezov9361e3209bfb
diff --git a/react/features/base/ui/functions.web.ts b/react/features/base/ui/functions.web.ts
index cbe8fb51b3..1e2e91ef68 100644
--- a/react/features/base/ui/functions.web.ts
+++ b/react/features/base/ui/functions.web.ts
@@ -117,5 +117,5 @@ export function operatesWithEnterKey(element: Element): boolean {
* @returns {number}
*/
export function getVideospaceFloatingElementsBottomSpacing(theme: Theme, isToolbarVisible: boolean) {
- return parseInt(isToolbarVisible ? theme.spacing(12) : theme.spacing(6), 10);
+ return isToolbarVisible ? theme.spacing(12) : theme.spacing(6);
}
diff --git a/react/features/subtitles/components/web/Captions.tsx b/react/features/subtitles/components/web/Captions.tsx
index b91e8e7674..bf480fa062 100644
--- a/react/features/subtitles/components/web/Captions.tsx
+++ b/react/features/subtitles/components/web/Captions.tsx
@@ -63,7 +63,7 @@ const styles = (theme: Theme, props: IProps) => {
if (_isLifted) {
// 10px is the space between the onstage participant display name label and subtitles. We also need
// to add the padding of the subtitles because it will decrease the gap between the label and subtitles.
- bottom += getStageParticipantNameLabelHeight(theme, _clientHeight) + 10 + padding;
+ bottom = `calc(${bottom} + ${getStageParticipantNameLabelHeight(theme, _clientHeight) + 10 + padding}px)`;
}
if (_shiftUp) {
@@ -73,7 +73,7 @@ const styles = (theme: Theme, props: IProps) => {
return {
transcriptionSubtitles: {
- bottom: `${bottom}px`,
+ bottom,
marginBottom: `${marginBottom}px`,
fontSize: `${fontSize}px`,
left: '50%',