SDKsAndroid
Create a video message
Create a video message from paths relative to the SDK data directory.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
videoPath | String | Yes | Video path relative to the SDK data directory. |
mimeType | String | Yes | Video type such as mp4. |
durationSeconds | long | Yes | Video duration in seconds. |
snapshotPath | String | Yes | Cover-image path relative to the SDK data directory. |
Message message = OpenIMClient.getInstance().messageManager.createVideoMessage(
videoPath,
mimeType,
durationSeconds,
snapshotPath
);Both files must be readable. The returned Message is only a local pending object. The SDK uploads the media and delivers the message when you continue with Send a message.
Was this page helpful?