Skip to content

Commit

Permalink
fix: add marker classes for the default VideoPreview components (#1172
Browse files Browse the repository at this point in the history
)

Adds marker CSS classes to the default `VideoPreview` components in
order to allow easier styling.

As part of this PR, an issue in Zoom Clone is fixed too (reference:
#1169)
  • Loading branch information
oliverlaz authored Oct 30, 2023
1 parent 48bbeca commit 7948cd8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions packages/react-sdk/src/components/VideoPreview/VideoPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@ import { LoadingIndicator } from '../LoadingIndicator';

const DefaultDisabledVideoPreview = () => {
const { t } = useI18n();
return <div>{t('Video is disabled')}</div>;
return (
<div className="str_video__video-preview__disabled-video-preview">
{t('Video is disabled')}
</div>
);
};

const DefaultNoCameraPreview = () => {
const { t } = useI18n();
return <div>{t('No camera found')}</div>;
return (
<div className="str_video__video-preview__no-camera-preview">
{t('No camera found')}
</div>
);
};

export type VideoPreviewProps = {
Expand Down
2 changes: 1 addition & 1 deletion sample-apps/react/zoom-clone/src/components/Preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const Preview = {
const disposeSoundDetector = createSoundDetector(
mediaStream,
({ audioLevel }) => setPercentage(audioLevel),
{ detectionFrequencyInMs: 80 },
{ detectionFrequencyInMs: 80, destroyStreamOnStop: false },
);

return () => {
Expand Down

0 comments on commit 7948cd8

Please sign in to comment.