スポットライト API¶
FocusSpotlightFixed¶
- x-sora-target:
Sora_20200807.FocusSpotlightFixed
指定した Connection ID のクライアントに常にフォーカスが当たるようにします。 UnfocusSpotlight API が呼ばれるまでフォーカスが当たり続けます。
キー |
型 |
|---|---|
channel_id |
string |
connection_id |
string |
$ curl -sS \
-X POST \
http://127.0.0.1:3000/ \
-H "x-sora-target: Sora_20200807.FocusSpotlightFixed" \
--json '{"channel_id":"sora","connection_id":"7QSNT842FS0J9E6BZDBC2DRYY8"}' \
| jq .
{
"channel_id": "sora",
"connection_id": "7QSNT842FS0J9E6BZDBC2DRYY8"
}
FocusSpotlight¶
- x-sora-target:
Sora_20200807.FocusSpotlight
指定した Connection ID のクライアントに強制的にフォーカスを当てます。
キー |
型 |
|---|---|
channel_id |
string |
connection_id |
string |
$ curl -sS \
-X POST \
http://127.0.0.1:3000/ \
-H "x-sora-target: Sora_20200807.FocusSpotlight" \
--json '{"channel_id":"sora","connection_id":"74Z2G1JS7S67DE226T8R1H3YGW"}' \
| jq .
{
"channel_id": "sora",
"connection_id": "74Z2G1JS7S67DE226T8R1H3YGW"
}
UnfocusSpotlight¶
- x-sora-target:
Sora_20200807.UnfocusSpotlight
指定した Connection ID のフォーカスを外します。
この API は FocusSpotlightFixed でフォーカスを当て続けている状態を解除する場合にも利用します。
キー |
型 |
|---|---|
channel_id |
string |
connection_id |
string |
$ curl -sS \
-X POST \
http://127.0.0.1:3000/ \
-H "x-sora-target: Sora_20200807.UnfocusSpotlight" \
--json '{"channel_id":"sora","connection_id":"74Z2G1JS7S67DE226T8R1H3YGW"}' \
| jq .
{
"channel_id": "sora",
"connection_id": "74Z2G1JS7S67DE226T8R1H3YGW"
}
ChangeSpotlightNumber¶
- x-sora-target:
Sora_20200807.ChangeSpotlightNumber
フォーカスする最大数を変更します。最小は 1 で最大は 8 です。
この API でフォーカス最大数を変更した後に、 type:connect で
spotlight_number を指定するクライアントは、 変更後の値 を指定する必要があります。
キー |
型 |
|---|---|
channel_id |
string |
spotlight_number |
integer (1..8) |
$ curl -sS \
-X POST \
http://127.0.0.1:3000/ \
-H "x-sora-target: Sora_20200807.ChangeSpotlightNumber" \
--json '{"channel_id":"sora","spotlight_number":1}' \
| jq .
{
"channel_id": "sora",
"spotlight_number": 1
}
RequestSpotlightRid¶
- x-sora-target:
Sora_20211215.RequestSpotlightRid
スポットライトのフォーカス時とアンフォーカス時の rid を指定します。
これにより接続時に指定した spotlight_focus_rid と spotlight_unfocus_rid の値を変更できます。
キー |
型 |
|---|---|
channel_id |
string |
recv_connection_id |
string |
send_connection_id (オプション) |
string |
spotlight_focus_rid |
string (none | r0 | r1 | r2) |
spotlight_unfocus_rid |
string (none | r0 | r1 | r2) |
$ curl -sS \
-X POST \
http://127.0.0.1:3000/ \
-H "x-sora-target: Sora_20211215.RequestSpotlightRid" \
--json '{"channel_id":"sora","recv_connection_id":"AD0ZWY8W492XV9RQGB40GX5C94","spotlight_focus_rid":"none","spotlight_unfocus_rid":"none"}' \
| jq .
{
"channel_id": "sora",
"recv_connection_id": "AD0ZWY8W492XV9RQGB40GX5C94",
"spotlight_focus_rid": "none",
"spotlight_unfocus_rid": "none"
}
ResetSpotlightRid¶
- x-sora-target:
Sora_20211215.ResetSpotlightRid
スポットライトのフォーカス時とアンフォーカス時の rid を接続時に指定した値に戻します。
キー |
型 |
|---|---|
channel_id |
string |
recv_connection_id |
string |
send_connection_id (オプション) |
string |
$ curl -sS \
-X POST \
http://127.0.0.1:3000/ \
-H "x-sora-target: Sora_20211215.ResetSpotlightRid" \
--json '{"channel_id":"sora","recv_connection_id":"AD0ZWY8W492XV9RQGB40GX5C94"}' \
| jq .
{
"channel_id": "sora",
"recv_connection_id": "AD0ZWY8W492XV9RQGB40GX5C94"
}
BatchRequestSpotlightRid¶
- x-sora-target:
Sora_20211215.BatchRequestSpotlightRid
スポットライトのフォーカス時とアンフォーカス時の rid を一括で変更します。
キー |
型 |
|---|---|
channel_id |
string |
item_list |
array |
item_list には以下が含まれます。
キー |
型 |
|---|---|
recv_connection_id |
string |
send_connection_id |
string |
spotlight_focus_rid |
string (none | r0 | r1 | r2) |
spotlight_unfocus_rid |
string (none | r0 | r1 | r2) |
$ curl -sS \
-X POST \
http://127.0.0.1:3000/ \
-H "x-sora-target: Sora_20211215.BatchRequestSpotlightRid" \
--json '{"channel_id":"sora","item_list":[{"recv_connection_id":"AD0ZWY8W492XV9RQGB40GX5C94","send_connection_id":"RGEFFZM95S2XN0PC03XNMCRTB0","spotlight_focus_rid":"none","spotlight_unfocus_rid":"none"},{"recv_connection_id":"AD0ZWY8W492XV9RQGB40GX5C94","send_connection_id":"P9AFYE2BQN7JB93Q6GK0VYWGHM","spotlight_focus_rid":"none","spotlight_unfocus_rid":"none"}]}' \
| jq .
{
"channel_id": "sora",
"item_list": [
{
"recv_connection_id": "AD0ZWY8W492XV9RQGB40GX5C94",
"result": "ok",
"send_connection_id": "RGEFFZM95S2XN0PC03XNMCRTB0",
"spotlight_focus_rid": "none",
"spotlight_unfocus_rid": "none"
},
{
"recv_connection_id": "AD0ZWY8W492XV9RQGB40GX5C94",
"result": "ok",
"send_connection_id": "P9AFYE2BQN7JB93Q6GK0VYWGHM",
"spotlight_focus_rid": "none",
"spotlight_unfocus_rid": "none"
}
]
}