@cometchat/chat-uikit-react-native
Version:
Ready-to-use Chat UI Components for React Native
59 lines (58 loc) • 1.98 kB
TypeScript
import { DataSource, DataSourceDecorator } from "../../shared/framework";
import { CometChat } from "@cometchat/chat-sdk-react-native";
import { JSX } from "react";
import { CometChatTheme } from "../../theme/type";
/**
*
*
* @description Decorator to generate thumbnails for media messages.
*/
export declare class ThumbnailGenerationExtensionDecorator extends DataSourceDecorator {
/**
*
*
* @param {DataSource} dataSource
* @description Creates an instance of ThumbnailGenerationExtensionDecorator.
*/
constructor(dataSource: DataSource);
/**
*
*
* @returns {string}
* @description Returns the unique ID for the thumbnail generation extension.
*/
getId(): string;
/**
*
*
* @param {CometChat.MediaMessage} message
* @returns {{ uri: string }}
* @description Checks for a generated thumbnail for the message. If available, returns the thumbnail URI;
* otherwise, returns the default image URI (for images) or an empty URI.
*/
checkThumbnail(message: CometChat.MediaMessage): {
uri: string;
};
/**
*
*
* @param {string} videoUrl
* @param {string} thumbnailUrl
* @param {CometChat.MediaMessage} message
* @param {CometChatTheme} theme
* @returns {JSX.Element}
* @description Returns the video message bubble element with thumbnail support.
*/
getVideoMessageBubble(videoUrl: string, thumbnailUrl: string, message: CometChat.MediaMessage, theme: CometChatTheme): JSX.Element;
/**
*
*
* @param {string} imageUrl
* @param {string} caption
* @param {CometChat.MediaMessage} message
* @param {CometChatTheme} theme
* @returns {JSX.Element}
* @description Returns the image message bubble element with thumbnail support.
*/
getImageMessageBubble(imageUrl: string, caption: string, message: CometChat.MediaMessage, theme: CometChatTheme): JSX.Element;
}