シグナリング API¶
DisconnectChannel¶
- x-sora-target:
Sora_20151104.DisconnectChannel
指定したチャネルの接続をすべて切断します。
キー |
型 |
---|---|
channel_id |
string |
reason (オプション) |
object |
reason
に値を指定した場合、イベントウェブフック connection.destroyed
の disconnect_api_reason
に指定した値が入ってきます。
$ http POST 127.0.0.1:3000 \
x-sora-target:Sora_20151104.DisconnectChannel \
channel_id=sora \
-vvv
POST / HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 22
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.4.0
x-sora-target: Sora_20151104.DisconnectChannel
{
"channel_id": "sora"
}
HTTP/1.1 200 OK
access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, x-sora-target
access-control-allow-methods: POST, OPTIONS
access-control-allow-origin: http://127.0.0.1:5000
access-control-max-age: 1000
content-length: 21
content-type: application/json
date: Wed, 07 Jul 2021 05:44:01 GMT
server: Cowboy
{
"channel_id": "sora"
}
DisconnectClient¶
- x-sora-target:
Sora_20151104.DisconnectClient
指定したクライアント ID の接続をすべて切断します。
キー |
型 |
---|---|
channel_id |
string |
client_id |
string |
reason (オプション) |
object |
reason
に値を指定した場合、イベントウェブフック connection.destroyed
の disconnect_api_reason
に指定した値が入ってきます。
$ http POST 127.0.0.1:3000/ \
x-sora-target:Sora_20151104.DisconnectClient \
channel_id=sora \
client_id=E2APPNQ9P97Q32V2ABW546SWW8 \
-vvv
POST / HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 65
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.4.0
x-sora-target: Sora_20151104.DisconnectClient
{
"channel_id": "sora",
"client_id": "E2APPNQ9P97Q32V2ABW546SWW8"
}
HTTP/1.1 200 OK
access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, x-sora-target
access-control-allow-methods: POST, OPTIONS
access-control-allow-origin: http://127.0.0.1:5000
access-control-max-age: 1000
content-length: 62
content-type: application/json
date: Wed, 07 Jul 2021 05:45:09 GMT
server: Cowboy
{
"channel_id": "sora",
"client_id": "E2APPNQ9P97Q32V2ABW546SWW8"
}
DisconnectConnection¶
- x-sora-target:
Sora_20151104.DisconnectConnection
指定したコネクション ID の接続を切断します。
キー |
型 |
---|---|
channel_id |
string |
connection_id |
string |
reason (オプション) |
object |
reason
に値を指定した場合、イベントウェブフック connection.destroyed
の disconnect_api_reason
に指定した値が入ってきます。
$ http POST 127.0.0.1:3000/ \
x-sora-target:Sora_20151104.DisconnectConnection \
channel_id=sora \
connection_id=T34CDBMRJS1B5BVPF17RTBQA3C \
-vvv
POST / HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 69
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.4.0
x-sora-target: Sora_20151104.DisconnectConnection
{
"channel_id": "sora",
"connection_id": "T34CDBMRJS1B5BVPF17RTBQA3C"
}
HTTP/1.1 200 OK
access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, x-sora-target
access-control-allow-methods: POST, OPTIONS
access-control-allow-origin: http://127.0.0.1:5000
access-control-max-age: 1000
content-length: 66
content-type: application/json
date: Wed, 07 Jul 2021 05:59:41 GMT
server: Cowboy
{
"channel_id": "sora",
"connection_id": "T34CDBMRJS1B5BVPF17RTBQA3C"
}
DisconnectChannelByRole¶
- x-sora-target:
Sora_20201120.DisconnectChannelByRole
指定したチャネルの指定したロールの接続を切断します。
キー |
型 |
---|---|
channel_id |
string |
role |
string (sendrecv | sendonly | recvonly) |
reason (オプション) |
object |
$ http POST 127.0.0.1:3000/ \
x-sora-target:Sora_20201120.DisconnectChannelByRole \
channel_id=sora \
role=sendrecv \
-vvv
POST / HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 42
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.2.0
x-sora-target: Sora_20201120.DisconnectChannelByRole
{
"channel_id": "sora",
"role": "sendrecv"
}
HTTP/1.1 200 OK
access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, x-sora-target
access-control-allow-methods: POST, OPTIONS
access-control-allow-origin: http://127.0.0.1:5000
access-control-max-age: 1000
content-length: 39
content-type: application/json
date: Thu, 03 Dec 2020 06:15:25 GMT
server: Cowboy
{
"channel_id": "sora",
"role": "sendrecv"
}
ListConnections¶
- x-sora-target:
Sora_20201013.ListConnections
すべての接続一覧を取得します。
キー |
型 |
デフォルト |
---|---|---|
local (オプション) |
boolean |
true |
local
はクラスター機能利用時に、全てのノードの情報を取得するかどうかを指定します。
$ http POST 127.0.0.1:3000/ \
x-sora-target:Sora_20201013.ListConnections \
-vvv
POST / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 0
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.2.0
x-sora-target: Sora_20201013.ListConnections
HTTP/1.1 200 OK
access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, x-sora-target
access-control-allow-methods: POST, OPTIONS
access-control-allow-origin: http://127.0.0.1:5000
access-control-max-age: 1000
content-length: 908
content-type: application/json
date: Wed, 25 Nov 2020 09:25:07 GMT
server: Cowboy
[
{
"node_name": "sora@127.0.0.1",
"audio": {
"codec_type": "OPUS"
},
"channel_id": "akane",
"client_id": "DV2Z3MSXC50M78Y11ETN3VZ360",
"created_time": 1642469139980509,
"bundle_id": "DV2Z3MSXC50M78Y11ETN3VZ360",
"connection_id": "DV2Z3MSXC50M78Y11ETN3VZ360",
"multistream": true,
"role": "sendrecv",
"simulcast": false,
"spotlight": false,
"video": {
"bit_rate": 1000,
"codec_type": "VP9",
"vp9_params": { "profile_id": 0 }
}
},
{
"node_name": "sora@127.0.0.1",
"audio": {
"codec_type": "OPUS"
},
"channel_id": "sora",
"client_id": "DKF93NH82X3BDB0CVKEH32JMVR",
"created_time": 1642469139980509,
"bundle_id": "DKF93NH82X3BDB0CVKEH32JMVR",
"connection_id": "DKF93NH82X3BDB0CVKEH32JMVR",
"multistream": true,
"role": "sendrecv",
"simulcast": false,
"spotlight": false,
"video": {
"bit_rate": 1000,
"codec_type": "VP9",
"vp9_params": { "profile_id": 0 }
}
},
{
"node_name": "sora@127.0.0.1",
"audio": {
"codec_type": "OPUS"
},
"channel_id": "sora",
"client_id": "W6725M370N2W301378Y5SFG01C",
"created_time": 1642469139980509,
"bundle_id": "W6725M370N2W301378Y5SFG01C",
"connection_id": "W6725M370N2W301378Y5SFG01C",
"multistream": true,
"role": "sendrecv",
"simulcast": false,
"spotlight": false,
"video": {
"bit_rate": 1000,
"codec_type": "VP9",
"vp9_params": { "profile_id": 0 }
}
}
]
ListChannelConnections¶
- x-sora-target:
Sora_20201013.ListChannelConnections
指定したチャネルの接続一覧を取得します。
キー |
型 |
---|---|
channel_id |
string |
$ http POST 127.0.0.1:3000/ \
x-sora-target:Sora_20201013.ListChannelConnections \
channel_id=sora \
-vvv
POST / HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 22
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.2.0
x-sora-target: Sora_20201013.ListChannelConnections
{
"channel_id": "sora"
}
HTTP/1.1 200 OK
access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, x-sora-target
access-control-allow-methods: POST, OPTIONS
access-control-allow-origin: http://127.0.0.1:5000
access-control-max-age: 1000
content-length: 605
content-type: application/json
date: Wed, 25 Nov 2020 09:26:00 GMT
server: Cowboy
[
{
"node_name": "sora@127.0.0.1",
"audio": {
"codec_type": "OPUS"
},
"channel_id": "sora",
"client_id": "DKF93NH82X3BDB0CVKEH32JMVR",
"created_time": 1642469139980509,
"bundle_id": "DKF93NH82X3BDB0CVKEH32JMVR",
"connection_id": "DKF93NH82X3BDB0CVKEH32JMVR",
"recording_block": false,
"multistream": true,
"role": "sendrecv",
"simulcast": false,
"spotlight": false,
"video": {
"bit_rate": 1000,
"codec_type": "VP9",
"vp9_params": { "profile_id": 0 }
}
},
{
"node_name": "sora@127.0.0.1",
"audio": {
"codec_type": "OPUS"
},
"channel_id": "sora",
"client_id": "W6725M370N2W301378Y5SFG01C",
"created_time": 1642469139980509,
"bundle_id": "W6725M370N2W301378Y5SFG01C",
"connection_id": "W6725M370N2W301378Y5SFG01C",
"recording_block": false,
"multistream": true,
"role": "sendrecv",
"simulcast": false,
"spotlight": false,
"video": {
"bit_rate": 1000,
"codec_type": "VP9",
"vp9_params": { "profile_id": 0 }
}
}
]