ChatMessage.createVideoSendMessage constructor
Creates a video message instance for sending.
Param targetId
The ID of the message recipient.
- For a one-to-one chat, it is the username of the peer user.
- For a group chat, it is the group ID.
- For a chat room, it is the chat room ID.
Param filePath
The path of the video file.
Param displayName
The video name.
Param duration
The video duration in seconds.
Param fileSize
The video file size in bytes.
Param thumbnailLocalPath
The local path of the thumbnail, which is usually the first frame of video.
Param width
The width of the video thumbnail, in pixels.
Param height
The height of the video thumbnail, in pixels.
Param chatType
The chat type, default is single chat, if it is group chat or chat room, see ChatType.
Return The message instance.
Implementation
ChatMessage.createVideoSendMessage({
required String targetId,
required String filePath,
String? displayName,
int duration = 0,
int? fileSize,
String? thumbnailLocalPath,
double? width,
double? height,
ChatType chatType = ChatType.Chat,
}) : this.createSendMessage(
chatType: chatType,
to: targetId,
body: ChatVideoMessageBody(
localPath: filePath,
displayName: displayName,
duration: duration,
fileSize: fileSize,
thumbnailLocalPath: thumbnailLocalPath,
width: width,
height: height,
));