UNPKG

@cometchat/chat-uikit-react-native

Version:

Ready-to-use Chat UI Components for React Native

51 lines (50 loc) 1.51 kB
import { JSX } from "react"; import { ImageSourcePropType, ImageStyle, ViewStyle } from "react-native"; /** * Props for the CometChatVideoBubble component. */ export interface CometChatVideoBubbleInterface { /** * URL for the video. */ videoUrl: string; /** * Thumbnail URL for the video bubble. */ thumbnailUrl?: ImageSourcePropType; /** * Placeholder image to display while the video is loading. */ placeholderImage?: ImageSourcePropType; /** * Custom play icon, which can be a JSX element or an image source. */ playIcon?: JSX.Element | ImageSourcePropType; /** * Callback function executed when the play button is clicked. * The function receives the video URL as a parameter. * * @param videoUrl - The URL of the video. */ onPress?: Function; /** * Custom style for the video thumbnail image. */ imageStyle?: ImageStyle; /** * Custom style for the play icon. */ playIconStyle?: ImageStyle; /** * Custom style for the container of the play icon. */ playIconContainerStyle?: ViewStyle; } /** * CometChatVideoBubble is a component that displays a video bubble with a thumbnail image * and a play icon. It handles video playback when the play icon is clicked. * * @param props - Props for the component. * @returns The rendered video bubble. */ export declare const CometChatVideoBubble: (props: CometChatVideoBubbleInterface) => JSX.Element;