Janus中所有插件都遵循以下基本数据流程:
{
"janus": "create",
"transaction": "XoldN2OmUa3r
}
{
"janus": "success",
"transaction": "XoldN2OmUa3r,
"data": {
"id": 7147844471131709
}
}
{
"janus": "attach",
"plugin": "janus.plugin.videoroom",
"session_id": 7147844471131709,
"transaction": "zZxl_ZT7tFwTU"
}
{
"janus": "success",
"session_id": 7147844471131709,
"transaction": "zZxl_ZT7tFwTU",
"data": {
"id": 7668325947218508
}
}
{
"janus": "message",
"session_id": 7147844471131709,
"handle_id": 7668325947218508
"transaction": "AblncRsrMM3T",
"body": {
"request": "join",
"room": 1234,
"ptype": "publisher",
"display": "ban"
}
}
{
"janus": "ack",
"session_id": 7147844471131709,
"transaction": "AblncRsrMM3T"
}
{
"janus": "event",
"session_id": 7147844471131709,
"transaction": "AblncRsrMM3T",
"sender": 7668325947218508,
"plugindata": {
"plugin": "janus.plugin.videoroom",
"data": {
"videoroom": "joined",
"room": 1234,
"description": "Demo Room",
"id": 8177683424697792,
"private_id": 1508384900,
"publishers":[]
}
}
}
{
"janus": "message",
"session_id": 7147844471131709,
"handle_id": 7668325947218508,
"transaction": "QvOYptHlhVOl",
"body": {
"request": "configure",
"audio": true,
"video": true
},
"jsep": {
"sdp": "......",
"type": "offer"
}
}
{
"candidate": {
"candidate": "candidate:2202484529 1 udp 2122262783 2409:8805:85e3:2dd9:l:l:al91:925c 55527 typ host generation 0",
"sdpMid": "audio",
"sdpMLinelndex": 0
},
"janus": "trickle",
"session_id": 7147844471131709,
"handle_id": 7668325947218508,
"transaction": "A39mtuEYv9cR"
}
{
"candidate": {
"candidate": "candidate:2530088836 1 udp 2122194687 192.168.1.106 33864 typ host generation 0",
"sdpMid": "audio",
"sdpMLinelndex": 0
}
"janus": "trickle",
"session_id": 7147844471131709,
"handle_id": 7668325947218508,
"transaction": "qFvztALbkXUG"
}
{
"candidate": {
"candidate": "candidate:2202484529 2 udp 2122262782 2409:8805:85e3:2dd9:l:l:al91:925c 42873 typ host generation 0",
"sdpMid": "audio",
"sdpMLinelndex": 0
},
"janus": "trickle",
"session_id": 7147844471131709,
"handle_id": 7668325947218508,
"transaction": "VOzahdOJx6pn"
}
{
"candidate": {
"candidate": "candidate:2530088836 2 udp 2122194686 192.168.1.106 44575 typ host generation 0",
"sdpMid": "audio",
"sdpMLinelndex": 0
},
"janus": "trickle",
"session_id": 7147844471131709,
"handle_id": 7668325947218508,
"transaction": "spupMHelabw8"
}
{
"janus": "ack",
"session_id": 7147844471131709,
"transaction": "QvOYptHlhVOl"
}
{
"janus": "event",
"session_id": 7147844471131709,
"transaction": "Qv0YptHlhVOl"
"sender": 7668325947218508,
"plugindata": {
"plugin": "janus.plugin.videoroom",
"data": {
"videoroom": "event",
"room": 1234,
"configured": "ok"
"audio_codec": "opus",
"video_codec": "h264"
}
},
"jsep":{
"type": "answer",
"sdp": "......"
}
}
{
"janus": "ack",
"session_id": 7147844471131709,
"transaction": "A39mtuEYv9cR"
}
{
"janus": "ack",
"session_id": 7147844471131709,
"transaction": "qFvztALbkXUG"
}
{
"janus": "ack",
"session_id": 7147844471131709,
"transaction": "VOzahdOJx6pn"
}
{
"janus": "ack",
"session_id": 7147844471131709,
"transaction": "spupMHelabw8"
}
{
"candidate": {
"completed": true
}
"janus": "trickle",
"session_id": 7147844471131709,
"handle_id": 7668325947218508,
"transaction": "43XefXDPTPMX"
}
{
"janus": "ack",
"session_id": 7147844471131709
"transaction": "43XefXDPTPMX"
}
{
"janus": "webrtcup",
"session_id": 7147844471131709,
"sender": 7668325947218508
}
{
"janus": "media",
"session_id": 7147844471131709,
"sender": 7668325947218508,
"type": "video",
"receiving": true
}
{
"janus": "media",
"session_id": 7147844471131709,
"sender": 7668325947218508,
"type": "audio",
"receiving": true
}
{
"janus": "keepalive",
"session_id": 7147844471131709,
"transaction": "WZqW7GMauQpS"
}
{
"janus": "ack",
"session_id": 7147844471131709,
"transaction": "WZqW7GMauQpS"
}
基于Webrtc和Janus的多人视频会议系统开发4 - 改造信令交互系统完成sdp交换过程
https://blog.csdn.net/u011382962/article/details/81708519