智慧服务,成就美好体验 项目咨询

主页 > 服务与支持 > 开发平台 > 客户端SDK参考 > Web SDK > 会议 会议消息

入门使用

会议消息

更新时间:2019-11-19

描述

该接口用于在会议中发送消息。

发送会议消息的前提是已加入会议。

业务流程

图1 会议消息流程图 
  1. 构建消息参数的数据结构messageParam。
  2. 调用sendMessage()接口在会议中发送消息,第1步中的messageParam作为参数。
    代码示例:
    var cloudecSendMsg = function () {
        var conference = client.getConfHandler();
        if (conference == null) {
            alert("Meeting has not yet started");
            return;
        }
    
        var cloudecMessageParam = {
            msgType: 0,
            msgContent: "this is message content",
            receiveID: -1
        }
    
        client.sendMessage(cloudecMessageParam);
    }
    
     

    参考文件:\usage\components\attendee_list.html。

  3. 接收方收到事件onChatRecvMsg事件的回调。
  4. 解析事件中的EC_ChatMsg对象。

注意事项

支持群聊和私聊。