sendSoundMessage method

  1. @Deprecated('sendSoundMessage自3.6.0开始弃用,我们将创建消息与发送消息分离,请先使用createSoundMessage创建消息,再调用sendMessage发送消息')
Future<V2TimValueCallback<V2TimMessage>> sendSoundMessage({
  1. required String soundPath,
  2. required String receiver,
  3. required String groupID,
  4. required int duration,
  5. MessagePriorityEnum? priority = MessagePriorityEnum.V2TIM_PRIORITY_NORMAL,
  6. bool onlineUserOnly = false,
  7. bool isExcludedFromUnreadCount = false,
  8. OfflinePushInfo? offlinePushInfo,
})

发送语音消息

注意: web不支持该接口

Implementation

@Deprecated('sendSoundMessage自3.6.0开始弃用,我们将创建消息与发送消息分离,请先使用createSoundMessage创建消息,再调用sendMessage发送消息')
Future<V2TimValueCallback<V2TimMessage>> sendSoundMessage({
  required String soundPath,
  required String receiver,
  required String groupID,
  required int duration,
  MessagePriorityEnum? priority = MessagePriorityEnum.V2TIM_PRIORITY_NORMAL,
  bool onlineUserOnly = false,
  bool isExcludedFromUnreadCount = false,
  OfflinePushInfo? offlinePushInfo,
}) async {
  return TencentCloudChatSdkPlatform.instance.sendSoundMessage(
      soundPath: soundPath,
      receiver: receiver,
      groupID: groupID,
      duration: duration,
      priority: priority!.index,
      onlineUserOnly: onlineUserOnly,
      isExcludedFromUnreadCount: isExcludedFromUnreadCount,
      offlinePushInfo: offlinePushInfo?.toJson());
}