MediaAttachmentFactory

constructor(maximumNumberOfPreviewedItems: Int = 4, skipEnrichUrl: Boolean = false, onContentItemClick: (mediaGalleryPreviewLauncher: ManagedActivityResultLauncher<MediaGalleryPreviewContract.Input, MediaGalleryPreviewResult?>, message: Message, attachmentPosition: Int, videoThumbnailsEnabled: Boolean, downloadAttachmentUriGenerator: DownloadAttachmentUriGenerator, downloadRequestInterceptor: DownloadRequestInterceptor, streamCdnImageResizing: StreamCdnImageResizing, skipEnrichUrl: Boolean) -> Unit = ::onMediaAttachmentContentItemClick, itemOverlayContent: @Composable (attachmentType: String?) -> Unit = { attachmentType -> if (attachmentType == AttachmentType.VIDEO) { DefaultItemOverlayContent() } }, previewItemOverlayContent: @Composable (attachmentType: String?) -> Unit = { attachmentType -> if (attachmentType == AttachmentType.VIDEO) { DefaultPreviewItemOverlayContent() } })

Parameters

maximumNumberOfPreviewedItems

The maximum number of thumbnails that can be displayed in a group when previewing Media attachments in the message list. Values between 4 and 8 are optimal.

skipEnrichUrl

Used by the media gallery. If set to true will skip enriching URLs when you update the message by deleting an attachment contained within it. Set to false by default.

onContentItemClick

Lambda called when an item gets clicked.

itemOverlayContent

Represents the content overlaid above individual items. By default it is used to display a play button over video previews.

previewItemOverlayContent

Represents the content overlaid above individual preview items. By default it is used to display a play button over video previews.