SDKsReact Native
Create a video message from files
OpenIM React Native SDK guide for create a video message from files.
Use createVideoMessageFromFullPath() to create a message from a video file and cover image on the device.
const message = await OpenIMSDK.createVideoMessageFromFullPath({
videoPath,
videoType: 'video/mp4',
duration: 36,
snapshotPath,
});Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
videoPath | string | Yes | Full path to the video file. |
videoType | string | Yes | Video type. |
duration | number | Yes | Video duration in seconds. |
snapshotPath | string | Yes | Full path to the video cover image. |
The call returns a MessageItem ready to send. Use Send a message to upload the local video and cover image.
Was this page helpful?