sendChatroomVideoMessage method
- {required String roomId,
- required String filePath,
- required int duration,
- required int width,
- required int height,
- String? displayName,
- NIMNosScene nosScene = NIMNosScenes.defaultIm,
- bool resend = false,
- ChatroomMessageAction? action}
发送聊天室视频消息
Implementation
Future<NIMResult<NIMChatroomMessage>> sendChatroomVideoMessage({
required String roomId,
required String filePath,
required int duration,
required int width,
required int height,
String? displayName,
NIMNosScene nosScene = NIMNosScenes.defaultIm,
bool resend = false,
ChatroomMessageAction? action,
}) async {
return _createMessage({
'roomId': roomId,
'filePath': filePath,
'duration': duration,
'width': width,
'height': height,
'displayName': displayName,
'nosScene': nosScene,
'messageType': 'video',
}).then((messageResult) async {
if (messageResult.isSuccess) {
final message = messageResult.data as NIMChatroomMessage;
await action?.call(message);
return sendChatroomMessage(message, resend);
} else {
return messageResult;
}
});
}