openplatform

应用 API

JSSDK 更新于 2026-08-28 阅读 8

发起音视频会议

conference.create

拨打音视频会议和一对一通话,一对一通话时仅支持 type 和 staffs 参数

蓝信版本: ios: >=8.5.0 android: >=8.5.0 windows: 不支持 mac: 不支持

示例代码

lx.open.conference.create({
  initType: "meeting",
  voiceVideoType: 'video',
  staffs: ['1123-jdshdjk', '1123-ldfdfkl'],
  title: 'XXX创建的会议',
  startTime: 0,
  memberJoinMute: false,
  memberJoinPassword: 123456,
  hostPassword: 234567,
  allowAdvenceJoin: false
  success: function () {},
  fail: function (error) {},
});

参数说明

字段 类型 必填 默认值 说明
initType String - 会议初始类型 ; call - 1v1 通话; meeting - 会议(视频会议)
voiceVideoType String voice 通话类型 ; voice - 语音通话; video - 视频通话 ; 注:initType 为 meeting 时,该参数不生效
staffs Array - 呼叫的对方人员 openStaffId 组成的数组。 ; 注:initType 为 call 时,该参数仅接收一人
title String - 会议标题,长度限制小于等于 200 ; 注:initType 为 call 时,该参数不生效
startTime Number 0 开始时间,立即开始为 0,需要预约为开始时间的时间戳; 注:initType 为 call 时,该参数不生效
needRecord Boolean false 是否开启会议录像 ; 注:initType 为 call 时,该参数不生效
memberJoinMute Boolean false 参会人入会时是否静音 ; 注:initType 为 call 时,该参数不生效
memberJoinPassword Number - 参会人入会密码,6 位数字,不需要密码时不传该参数 ; 注:initType 为 call 时,该参数不生效
hostPassword Number - 主持密码,6 位数字,不需要密码时不传该参数 ; 注:initType 为 call 时,该参数不生效
allowAdvenceJoin Boolean false 允许参会人提前入会,立即开始的会议不支持此参数 ; 注:initType 为 call 时,该参数不生效

SUCCESS 返回值说明

字段 类型 说明
meetingNumber String 会议号
conferenceId Number 会议 id,取消会议时需要的必传参数

errorCode 说明

code 值 message 值 说明
-1 INVALID_REQUEST 参数错误,id 或 type 错误等

加入音视频会议

conference.join

加入会议

蓝信版本: ios: >=8.5.0 android: >=8.5.0 windows: 不支持 mac: 不支持

示例代码

lx.open.conference.join({
  meetingNumber: "122",
  videoOpen: true,
  audioOpen: true,
  password: '123456'
  success: function () {},
  fail: function (error) {},
});

参数说明

字段 类型 必填 默认值 说明
meetingNumber String - 需要加入的会议号
videoOpen Boolean true 是否开启摄像头
audioOpen Boolean true 是否开启麦克风
password String - 入会密码,创建会议时设置了密码的情况下必填。如果加入会议的是主持人则为主持密码,如果加入会议的是参会人则为参会人入会密码

errorCode 说明

code 值 message 值 说明
-3 SERVER_INTERNAL_ERROR 查询组织视频会议应用异常
-8 NOT_EXIST 会议号不存在或密码错误

取消预约音视频会议

conference.cancel

蓝信版本: ios: >=8.5.0 android: >=8.5.0 windows: 不支持 mac: 不支持

示例代码

lx.open.conference.cancel({
  conferenceId: 123,
  success: function () {},
  fail: function (error) {},
});

参数说明

字段 类型 必填 默认值 说明
conferenceId Number - 会议 id

errorCode 说明

code 值 message 值 说明
-3 SERVER_INTERNAL_ERROR 查询组织视频会议应用异常
-8 NOT_EXIST 会议号不存在或密码错误

发起直播

living.create

蓝信版本: ios: >=8.5.0 android: >=8.5.0 windows: >=7.35.30 mac: >=7.35.30

示例代码

lx.open.living.create({
  title: '',
  startTime: 0,
  permission: 'all',
  remindStaffs: [],
  remindContent: ',
  needReplay: true,
  success: function () {},
  fail: function (error) {},
});

参数说明

字段 类型 必填 默认值 说明
title String - 直播标题,长度限制小于等于 32
startTime Number - 开始时间,立即开始为 0,需要预约为开始时间的时间戳
permission String all 可观看人员; all - 全部; remindStaffs - 提醒的人员
remindStaffs Array - 开播提醒的人员; permission 为 remind 时必传,为 all 时可选
remindContent String - 开播提醒的内容,remind 为 true 时该参数生效,长度限制小于等于 100
needReplay Boolean true 是否生成直播回放

SUCCESS 返回值说明

字段 类型 说明
livingId String livingId

errorCode 说明

code 值 message 值 说明
-1 INVALID_REQUEST 参数错误
-3 SERVER_INTERNAL_ERROR 查询组织直播应用异常
120011 REMIND_STAFFS_ILLEGAL 提醒人员不合法,例如 remindStaffs 中有不可观看直播人员
120012 LENGTH_EXCEEDS_LIMIT 长度超出限制,title 或者 remindContent 长度超出限制
120013 STARTTIME_ERROR 预约时间错误,例如开始时间早于当前时间

观看直播

living.watch

蓝信版本: ios: >=8.5.0 android: >=8.5.0 windows: >=7.35.30 mac: >=7.35.30

示例代码

lx.open.living.watch({
  livingId: "123",
  success: function () {},
  fail: function (error) {},
});

参数说明

字段 类型 必填 默认值 说明
livingId String - 直播 id

SUCCESS 返回值说明

字段 类型 说明
livingId String livingId

errorCode 说明

code 值 message 值 说明
-3 SERVER_INTERNAL_ERROR 查询组织直播应用异常

取消预约直播

living.cancel

蓝信版本: ios: >=8.5.0 android: >=8.5.0 windows: >=7.35.30 mac: >=7.35.30

示例代码

lx.open.living.cancel({
  livingId: "123",
  success: function () {},
  fail: function (error) {},
});

参数说明

字段 类型 必填 默认值 说明
livingId String - 直播 id

SUCCESS 返回值说明

字段 类型 说明
livingId String livingId

errorCode 说明

code 值 message 值 说明
-1 INVALID_REQUEST 参数错误
-3 SERVER_INTERNAL_ERROR 查询组织直播应用异常
-8 NOT_EXIST 直播 id 不存在
120012 STATUS_CHANGE 直播状态改变,例如预约的直播已经开播