sendMessage static method
发送文本消息。
该接口需要在自己加入频道成功后才能调用 当参数content大于4K时消息的发送不可靠,为确保消息发送的可靠性可以对消息内容进行压缩。
-
channelId频道标识符 -
content消息内容,content不能为空,content不能大于 4k -
toUserId接收者id,null则发给频道所有人员 -
Returns 返回状态码 见JRTCErrorCode。
Implementation
static Future<int> sendMessage(
String channelId, String content, String? toUserId) async {
return await JRTCExpressEngineImpl.sendMessage(
channelId, content, toUserId);
}