Update the active-speaker layout

This commit is contained in:
harshithpabbati 2022-01-17 13:39:39 +05:30
parent 71987c3f2b
commit 623c15f2d3
4 changed files with 87 additions and 82 deletions

View File

@ -1,17 +1,6 @@
import React from 'react'; import React from 'react';
import VideoContainer from '@custom/shared/components/VideoContainer/VideoContainer';
import { Container } from './Container';
import { Header } from './Header';
import { VideoView } from './VideoView'; import { VideoView } from './VideoView';
export function Room({ children }) { export const Room = () => <VideoView />;
return (
<Container>
<Header />
<VideoContainer>{children ? children : <VideoView />}</VideoContainer>
</Container>
);
}
export default Room; export default Room;

View File

@ -7,6 +7,7 @@ import React, {
} from 'react'; } from 'react';
import Button from '@custom/shared/components/Button'; import Button from '@custom/shared/components/Button';
import Tile from '@custom/shared/components/Tile'; import Tile from '@custom/shared/components/Tile';
import VideoContainer from '@custom/shared/components/VideoContainer';
import { import {
DEFAULT_ASPECT_RATIO, DEFAULT_ASPECT_RATIO,
MEETING_STATE_JOINED, MEETING_STATE_JOINED,
@ -20,6 +21,8 @@ import { ReactComponent as IconArrow } from '@custom/shared/icons/raquo-md.svg';
import sortByKey from '@custom/shared/lib/sortByKey'; import sortByKey from '@custom/shared/lib/sortByKey';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { useDeepCompareMemo } from 'use-deep-compare'; import { useDeepCompareMemo } from 'use-deep-compare';
import Container from '../Call/Container';
import Header from '../Call/Header';
// --- Constants // --- Constants
@ -294,6 +297,9 @@ export const GridView = ({
const handleNextClick = () => setPage((p) => p + 1); const handleNextClick = () => setPage((p) => p + 1);
return ( return (
<Container>
<Header />
<VideoContainer>
<div ref={gridRef} className="grid"> <div ref={gridRef} className="grid">
{(pages > 1 && page > 1) && ( {(pages > 1 && page > 1) && (
<Button <Button
@ -357,6 +363,8 @@ export const GridView = ({
} }
`}</style> `}</style>
</div> </div>
</VideoContainer>
</Container>
); );
}; };

View File

@ -118,7 +118,7 @@ export const Intro = ({
/> />
</Field> </Field>
</CardBody> </CardBody>
<CardFooter divider> <CardFooter>
<Button <Button
loading={fetching} loading={fetching}
fullWidth fullWidth

View File

@ -1,10 +1,13 @@
import React, { useEffect, useMemo, useRef } from 'react'; import React, { useEffect, useMemo, useRef } from 'react';
import ParticipantBar from '@custom/shared/components/ParticipantBar/ParticipantBar'; import ParticipantBar from '@custom/shared/components/ParticipantBar/ParticipantBar';
import VideoContainer from '@custom/shared/components/VideoContainer';
import { useCallState } from '@custom/shared/contexts/CallProvider'; import { useCallState } from '@custom/shared/contexts/CallProvider';
import { useParticipants } from '@custom/shared/contexts/ParticipantsProvider'; import { useParticipants } from '@custom/shared/contexts/ParticipantsProvider';
import { useTracks } from '@custom/shared/contexts/TracksProvider'; import { useTracks } from '@custom/shared/contexts/TracksProvider';
import { useUIState } from '@custom/shared/contexts/UIStateProvider'; import { useUIState } from '@custom/shared/contexts/UIStateProvider';
import { isScreenId } from '@custom/shared/contexts/participantsState'; import { isScreenId } from '@custom/shared/contexts/participantsState';
import Container from '../Call/Container';
import Header from '../Call/Header';
import { ScreensAndPins } from './ScreensAndPins'; import { ScreensAndPins } from './ScreensAndPins';
import { SpeakerTile } from './SpeakerTile'; import { SpeakerTile } from './SpeakerTile';
@ -77,6 +80,9 @@ export const SpeakerView = () => {
return ( return (
<div className="speaker-view"> <div className="speaker-view">
<Container>
<Header />
<VideoContainer>
<div ref={activeRef} className="active"> <div ref={activeRef} className="active">
{screensAndPinned.length > 0 ? ( {screensAndPinned.length > 0 ? (
screenShareTiles screenShareTiles
@ -84,6 +90,8 @@ export const SpeakerView = () => {
<SpeakerTile screenRef={activeRef} participant={currentSpeaker} /> <SpeakerTile screenRef={activeRef} participant={currentSpeaker} />
)} )}
</div> </div>
</VideoContainer>
</Container>
{showSidebar && ( {showSidebar && (
<ParticipantBar <ParticipantBar
fixed={fixedItems} fixed={fixedItems}