实时音视频会议

1. 创建会议室

1.0.1. 地址

http://domain:18080/admin/conference/create

1.0.2. body

参数 类型 必需 描述
roomId string 房间ID,不可重复
description string 房间描述
pin string 房间密码
max_publishers int 最大交互成员人数
bitrate int 单路音视频最大码率
advance bool 是否是超级会议
recording bool 是否在服务器端录制
permanent bool 是否持久化会议,如果使用持久化注意使用后销毁,避免保存的会议无限增长

1.0.3. 响应

N/A

1.0.4. 示例

curl -X POST -H "nonce:76616" -H "timestamp":"1558350862502" -H "sign":"b98f9b0717f59febccf1440067a7f50d9b31bdde" -H "Content-Type:application/json" -d "{  \
  \"roomId\":\"roomid1\",                             \
  \"description\":\"my conference\",                             \
  \"pin\":\"123456\",                             \
  \"max_publishers\":20",                             \
  }" http://localhost:18080/admin/conference/create

{
  "code":0,
  "msg":"success"
}

2. 销毁会议室信息

2.0.1. 地址

http://domain:18080/admin/conference/destroy

2.0.2. body

参数 类型 必需 描述
roomId string 会议室ID
advance bool 是否是超级会议

2.0.3. 响应

N/A

2.0.4. 示例

curl -X POST -H "nonce:76616" -H "timestamp":"1558350862502" -H "sign":"b98f9b0717f59febccf1440067a7f50d9b31bdde" -H "Content-Type:application/json" -d "{\"roomId\":\"aaaa\"}" http://localhost:18080/admin/conference/destroy

{
  "code":0,
  "msg":"success"
}

3. 获取会议室列表

3.0.1. 地址

http://domain:18080/admin/conference/list

3.0.2. body

N/A

3.0.3. 响应

响应

参数 类型 必需 描述
conferenceInfoList Object[] 会议信息列表

会议信息

参数 类型 必需 描述
roomId string 房间ID,不可重复
serverId string 会议室服务ID,如果超级会议为空,否则必须存在
description string 房间描述
max_publishers int 最大交互成员人数
num_publishers int 会议参会人数
bitrate int 单音视频最大码率
advance bool 是否是超级会议
recording bool 是否在服务器端录制

3.0.4. 示例

curl -X POST -H "nonce:76616" -H "timestamp":"1558350862502" -H "sign":"b98f9b0717f59febccf1440067a7f50d9b31bdde" -H "Content-Type:application/json"  http://localhost:18080/admin//conference/list

{
  "code":0,
  "msg":"success",
  "result":[{
    "roomId":"aaaa",
    "serverId":"aaaa",
    ...
  }
  ]
}

4. 获取会议室成员列表

4.0.1. 地址

http://domain:18080/admin/conference/list_participant

4.0.2. body

参数 类型 必需 描述
roomId string 会议室ID
advance bool 是否是超级会议

4.0.3. 响应

参数 类型 必需 描述
participantList Object[] 会议信息列表

成员信息

参数 类型 必需 描述
userId string 房间ID,不可重复
publishing bool 是否发布者

4.0.4. 示例

curl -X POST -H "nonce:76616" -H "timestamp":"1558350862502" -H "sign":"b98f9b0717f59febccf1440067a7f50d9b31bdde" -H "Content-Type:application/json" -d "{\"roomId\":\"aaaa\"}" http://localhost:18080/admin/conference/list_participant

{
  "code":0,
  "msg":"success",
  "result":[{
    "roomId":"aaaa",
    "serverId":"aaaa",
    ...
  }
  ]
}

5. 检查会议室是否存在

5.0.1. 地址

http://domain:18080/admin/conference/exist

5.0.2. body

参数 类型 必需 描述
conferenceId string 会议ID

5.0.3. 响应

参数 类型 必需 描述
result bool 是否存在

5.0.4. 示例

curl -X POST -H "nonce:76616" -H "timestamp":"1558350862502" -H "sign":"b98f9b0717f59febccf1440067a7f50d9b31bdde" -H "Content-Type:application/json" -d "{\"conferenceId\":\"roomid1\"}" http://localhost:18080/admin/conference/exist

{
  "code":0,
  "msg":"success",
  "result":true
}

6. 开启/关闭会议录制

6.0.1. 地址

http://domain:18080/admin/conference/recording

6.0.2. body

参数 类型 必需 描述
roomId string 会议室ID
advance bool 是否是超级会议
recording bool 是否开启录制

6.0.3. 响应

N/A

6.0.4. 示例

curl -X POST -H "nonce:76616" -H "timestamp":"1558350862502" -H "sign":"b98f9b0717f59febccf1440067a7f50d9b31bdde" -H "Content-Type:application/json" -d "{\"roomId\":\"roomid1\",\"advance\":false,\"recording\":true}" http://localhost:18080/admin/conference/recording

{
  "code":0,
  "msg":"success"
}

7. RTP转发

将指定参会者的音视频流转发到指定RTP端口。

7.0.1. 地址

http://domain:18080/admin/conference/rtp_forward

7.0.2. body

参数 类型 必需 描述
roomId string 会议室ID
publisherId string 发布者用户ID
host string RTP转发目标主机地址
audioPort int 音频RTP端口
audioPt int 音频Payload Type
audioSSRC long 音频SSRC
videoPort int 视频RTP端口
videoPt int 视频Payload Type
videoSSRC long 视频SSRC

7.0.3. 响应

N/A

7.0.4. 示例

curl -X POST -H "nonce:76616" -H "timestamp":"1558350862502" -H "sign":"b98f9b0717f59febccf1440067a7f50d9b31bdde" -H "Content-Type:application/json" -d "{\"roomId\":\"roomid1\",\"publisherId\":\"user1\",\"host\":\"192.168.1.100\",\"audioPort\":5004,\"audioPt\":111,\"audioSSRC\":123456,\"videoPort\":5006,\"videoPt\":96,\"videoSSRC\":654321}" http://localhost:18080/admin/conference/rtp_forward

{
  "code":0,
  "msg":"success"
}

8. 停止RTP转发

停止指定参会者的RTP流转发。

8.0.1. 地址

http://domain:18080/admin/conference/stop_rtp_forward

8.0.2. body

参数 类型 必需 描述
roomId string 会议室ID
publisherId string 发布者用户ID
streamId long 流ID

8.0.3. 响应

N/A

8.0.4. 示例

curl -X POST -H "nonce:76616" -H "timestamp":"1558350862502" -H "sign":"b98f9b0717f59febccf1440067a7f50d9b31bdde" -H "Content-Type:application/json" -d "{\"roomId\":\"roomid1\",\"publisherId\":\"user1\",\"streamId\":123}" http://localhost:18080/admin/conference/stop_rtp_forward

{
  "code":0,
  "msg":"success"
}

9. 列出RTP转发器

获取会议室内所有的RTP转发器列表。

9.0.1. 地址

http://domain:18080/admin/conference/list_rtp_forward

9.0.2. body

参数 类型 必需 描述
roomId string 会议室ID

9.0.3. 响应

参数 类型 必需 描述
roomId string 会议室ID
forwarders Object[] 转发器列表

转发器信息

参数 类型 必需 描述
publisherId string 发布者用户ID
streams Object[] 流列表

流信息

参数 类型 必需 描述
streamId long 流ID
type string 流类型(audio/video)
host string 目标主机地址
port int 目标端口
ssrc long SSRC
pt int Payload Type

9.0.4. 示例

curl -X POST -H "nonce:76616" -H "timestamp":"1558350862502" -H "sign":"b98f9b0717f59febccf1440067a7f50d9b31bdde" -H "Content-Type:application/json" -d "{\"roomId\":\"roomid1\"}" http://localhost:18080/admin/conference/list_rtp_forward

{
  "code":0,
  "msg":"success",
  "result":{
    "roomId":"roomid1",
    "forwarders":[{
      "publisherId":"user1",
      "streams":[{
        "streamId":123,
        "type":"audio",
        "host":"192.168.1.100",
        "port":5004,
        "ssrc":123456,
        "pt":111
      }]
    }]
  }
}
2018 © wildfirechat.net 京ICP备18060403号-1 all right reserved,powered by Gitbook该文件修订时间: 2026-02-09 13:34:24

results matching ""

    No results matching ""