Skip to main content

Short Video Messages

Nexconn Chat UI supports SDK ShortVideoMessage messages. Short videos can be selected from the album, recorded with the camera plugin, sent through ChatProvider, displayed in message bubbles, and opened in ShortVideoPreviewPage.

Send a Short Video

Use ChatProvider.sendShortVideoMessage with a local video path and duration in seconds.

Dart
await chatProvider.sendShortVideoMessage(
'/local/path/clip.mp4',
8,
);

This helper sends ShortVideoMessageParams through the current channel.

Dart
await chatProvider.sendShortVideoMessage(
'/local/path/clip.mp4',
8,
needReceipt: true,
);

Default Input Plugins

The extension panel can send short videos from the album or camera.

Dart
ChatPageConfig(
inputConfig: MessageInputConfig(
extensionPlugins: [
MessageInputExtensionPlugin.video(title: 'Video'),
MessageInputExtensionPlugin.filming(title: 'Record'),
],
),
)

The default album video picker accepts one video and keeps the duration within the UI limit. The default camera recorder is configured for short clips and rejects clips that are too short.

The default video and filming entries request permissions by flow. video requests media-library access. Direct Android filming requests camera and microphone only. Non-direct filming or custom picker flows that need gallery access can still request media-library access before opening the picker. If permission is denied or the user cancels the picker, no message is sent.

Custom Video Source

Use mediaDraftResolver when your app has its own camera, editor, transcoder, or picker.

Dart
MessageInputExtensionPlugin.video(
title: 'Video',
mediaDraftResolver: (context, plugin) async {
return [
MessageInputMediaDraft(
path: '/local/path/clip.mp4',
duration: 8,
),
];
},
)

Preview

ShortVideoPreviewPage accepts a list of ShortVideoMessage items.

Dart
Navigator.of(context).push(
MaterialPageRoute(
builder: (_) => ShortVideoPreviewPage(
videos: [shortVideoMessage],
),
),
);

Encoding support, upload limits, storage policy, and remote playback availability are determined by the underlying Nexconn SDK and service configuration.