sendSoundMessage method
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,
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 {
Map<String, dynamic> param = {
"soundPath": soundPath,
"receiver": receiver,
"duration": duration,
"groupID": groupID,
"priority": priority,
"onlineUserOnly": onlineUserOnly,
"isExcludedFromUnreadCount": isExcludedFromUnreadCount,
"offlinePushInfo": offlinePushInfo,
};
var resp = V2TimValueCallback<V2TimMessage>.fromJson(
formatJson(
await _channel.invokeMethod(
"sendSoundMessage",
buildMessageMangerParam(
param,
),
),
),
);
log("sendSoundMessage", param, resp.toLogString());
return resp;
}