MediaAttachmentContent

fun MediaAttachmentContent(attachmentState: AttachmentState, modifier: Modifier = Modifier, maximumNumberOfPreviewedItems: Int = 4, skipEnrichUrl: Boolean = false, onItemClick: (mediaGalleryPreviewLauncher: ManagedActivityResultLauncher<MediaGalleryPreviewContract.Input, MediaGalleryPreviewResult?>, message: Message, attachmentPosition: Int, videoThumbnailsEnabled: Boolean, streamCdnImageResizing: StreamCdnImageResizing, skipEnrichUrl: Boolean) -> Unit = ::onMediaAttachmentContentItemClick, itemOverlayContent: @Composable (attachmentType: String?) -> Unit = { attachmentType -> if (attachmentType == AttachmentType.VIDEO) { PlayButton() } })

Displays a preview of single or multiple video or attachments.

Parameters

attachmentState

The state of the attachment, holding the root modifier, the message and the onLongItemClick handler.

modifier

The modifier used for styling.

maximumNumberOfPreviewedItems

The maximum number of thumbnails that can be displayed in a group when previewing Media attachments in the message list.

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.

onItemClick

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.