Skip to content

Commit

Permalink
Merge branch 'main' into cnwankwo/together_mode_bugbash_fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cn0151 authored Jan 30, 2025
2 parents 7b328a2 + 2a16f41 commit 1231410
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ import { CaptionsBanner, usePropsFor } from '@azure/communication-react';
import React from 'react';

export const CaptionsBannerStory = (): JSX.Element => {
/**
* This is a snippet for the CaptionsBanner component.
* For this snippet we set the isCaptionsOn and isRealTimeTextOn to true so the captions banner will be visible at all times with both functionalities enabled.
* Without setting the isCaptionsOn and isRealTimeTextOn to true, the captions banner will not be visible until start Captions is called or a first real time text message is received.
*/
const captionsBannerProps = usePropsFor(CaptionsBanner);
return (
<>
{(captionsBannerProps?.isCaptionsOn || captionsBannerProps?.isRealTimeTextOn) && (
<CaptionsBanner {...captionsBannerProps} />
)}
</>
);
return <CaptionsBanner {...captionsBannerProps} isCaptionsOn={true} isRealTimeTextOn={true} />;
};

0 comments on commit 1231410

Please sign in to comment.