@azure/communication-react
Version:
React library for building modern communication user experiences utilizing Azure Communication Services
80 lines • 1.85 kB
TypeScript
/// <reference types="react" />
import { OnRenderAvatarCallback } from '../types';
/**
* @public
* information required for each line of caption
*/
export type CaptionsInformation = {
/**
* unique id for each caption
*/
id: string;
/**
* speaker's display name
*/
displayName: string;
/**
* content of the caption
*/
captionText: string;
/**
* id of the speaker
*/
userId?: string;
};
/**
* @public
* strings for captions banner
*/
export interface CaptionsBannerStrings {
/**
* Spinner text for captions banner
*/
captionsBannerSpinnerText?: string;
}
/**
* @public
* CaptionsBanner Component Props.
*/
export interface CaptionsBannerProps {
/**
* Array of captions to be displayed
*/
captions: CaptionsInformation[];
/**
* Flag to indicate if captions are on
*/
isCaptionsOn?: boolean;
/**
* Flag to indicate if captions are being started
* This is used to show spinner while captions are being started
*/
startCaptionsInProgress?: boolean;
/**
* Optional callback to override render of the avatar.
*
* @param userId - user Id
*/
onRenderAvatar?: OnRenderAvatarCallback;
/**
* Optional strings for the component
*/
strings?: CaptionsBannerStrings;
/**
* Optional form factor for the component.
* @defaultValue 'default'
*/
formFactor?: 'default' | 'compact';
/**
* Optional options for the component.
*/
captionsOptions?: {
height: 'full' | 'default';
};
}
/**
* @public
* A component for displaying a CaptionsBanner with user icon, displayName and captions text.
*/
export declare const CaptionsBanner: (props: CaptionsBannerProps) => JSX.Element;
//# sourceMappingURL=CaptionsBanner.d.ts.map