sendVideoMessage method

  1. @override
Future<V2TimValueCallback<V2TimMessage>> sendVideoMessage({
  1. required String videoFilePath,
  2. required String receiver,
  3. required String type,
  4. required String snapshotPath,
  5. required int duration,
  6. required String groupID,
  7. int priority = 0,
  8. bool onlineUserOnly = false,
  9. bool isExcludedFromUnreadCount = false,
  10. Map<String, dynamic>? offlinePushInfo,
  11. String? fileName,
  12. Uint8List? fileContent,
})
override

发送视频消息

web 端发送视频消息时需要传入fileName, fileContent字段 不支持 snapshotPath、duration、type

Implementation

@override
Future<V2TimValueCallback<V2TimMessage>> sendVideoMessage({
  required String videoFilePath,
  required String receiver,
  required String type,
  required String snapshotPath,
  required int duration,
  required String groupID,
  int priority = 0,
  bool onlineUserOnly = false,
  bool isExcludedFromUnreadCount = false,
  Map<String, dynamic>? offlinePushInfo,
  String? fileName,
  Uint8List? fileContent,
}) async {
  Map<String, dynamic> param = {
    "videoFilePath": videoFilePath,
    "receiver": receiver,
    "snapshotPath": snapshotPath,
    "duration": duration,
    "type": type,
    "groupID": groupID,
    "priority": priority,
    "onlineUserOnly": onlineUserOnly,
    "isExcludedFromUnreadCount": isExcludedFromUnreadCount,
    "offlinePushInfo": offlinePushInfo,
    "fileName": fileName,
    "fileContent": fileContent
  };
  var resp = V2TimValueCallback<V2TimMessage>.fromJson(
    formatJson(
      await _channel.invokeMethod(
        "sendVideoMessage",
        buildMessageMangerParam(
          param,
        ),
      ),
    ),
  );
  log("sendVideoMessage", param, resp.toLogString());
  return resp;
}