sendSoundMessage method

  1. @override
Future<V2TimValueCallback<V2TimMessage>> sendSoundMessage({
  1. required String soundPath,
  2. required String receiver,
  3. required String groupID,
  4. required int duration,
  5. int priority = 0,
  6. bool onlineUserOnly = false,
  7. bool isExcludedFromUnreadCount = false,
  8. Map<String, dynamic>? offlinePushInfo,
})
override

发送语音消息

注意: web不支持该接口

Implementation

@override
Future<V2TimValueCallback<V2TimMessage>> sendSoundMessage({
  required String soundPath,
  required String receiver,
  required String groupID,
  required int duration,
  int priority = 0,
  bool onlineUserOnly = false,
  bool isExcludedFromUnreadCount = false,
  Map<String, dynamic>? offlinePushInfo,
}) async {
  return V2TimValueCallback<V2TimMessage>.fromJson(
    formatJson(
      await _channel.invokeMethod(
        "sendSoundMessage",
        buildMessageMangerParam(
          {
            "soundPath": soundPath,
            "receiver": receiver,
            "duration": duration,
            "groupID": groupID,
            "priority": priority,
            "onlineUserOnly": onlineUserOnly,
            "isExcludedFromUnreadCount": isExcludedFromUnreadCount,
            "offlinePushInfo": offlinePushInfo,
          },
        ),
      ),
    ),
  );
}