実験的 API

概要

実験的 API とは、今後のアップデートで互換性を保証しない API です。

将来的には正式版としてリリースするか、または非推奨となり廃止するかのどちらかです。

シグナリング API

警告

この API は実験的機能のため、正式版では仕様が変更される可能性があります

全てのチャネル一覧を取得する

サービス

Sora

バージョン

20201013

オペレーション

ListChannels

x-sora-target

Sora_20201013.ListChannels

全てのチャネル一覧を返します。

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20201013.ListChannels \
    -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.ListChannels



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: 120
content-type: application/json
date: Thu, 26 Nov 2020 04:16:17 GMT
server: Cowboy

[
    {
        "channel_id": "sora",
        "multistream": true,
        "spotlight": false
    },
    {
        "channel_id": "akane",
        "multistream": true,
        "spotlight": false
    }
]

RTP 転送 API

警告

この API は実験的機能のため、正式版では仕様が変更される可能性があります

指定したチャネル ID の配信している映像または音声の RTP を指定した IP アドレスとポートに送信します。

指定したチャネルの RTP の転送を開始する

サービス

Sora

バージョン

20170814

オペレーション

StartForwardingRtp

x-sora-target

Sora_20170814.StartForwardingRtp

キー

channel_id

string

connection_id (オプション)

string

ip_address

string

audio_port

integer

video_port

integer

マルチストリームの音声や映像を転送する場合は connection_id を指定してください。

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20170814.StartForwardingRtp \
    channel_id=sora \
    ip_address=127.0.0.1 \
    audio_port:=60001 \
    video_port:=60003 \
    -vvv

POST / HTTP/1.1
Accept: application/json
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 93
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/0.9.2
x-sora-target: Sora_20170814.StartForwardingRtp

{
    "audio_port": 60001,
    "channel_id": "sora",
    "ip_address": "127.0.0.1",
    "video_port": 60003
}

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: 262
content-type: application/json
date: Wed, 30 Aug 2017 02:08:50 GMT
server: Cowboy

{
    "sdp": "v=0\r\no=- 0 0 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\nm=audio 60001 RTP/SAVPF 109\r\nc=IN IP4 127.0.0.1\r\na=rtpmap:109 opus/48000/2\r\nm=video 60003 RTP/SAVPF 120\r\nc=IN IP4 127.0.0.1\r\na=rtpmap:120 VP9/90000\r\na=fmtp:120 max-fs=12288;max-fr=60\r\n"
}

指定したチャネルの RTP の転送を停止する

サービス

Sora

バージョン

20170814

オペレーション

StopForwardingRtp

x-sora-target

Sora_20170814.StopForwardingRtp

キー

channel_id

string

connection_id (オプション)

string

マルチストリームの音声や映像の転送を停止する場合は connection_id を指定してください。

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20170814.StopForwardingRtp \
    channel_id=sora \
    -vvv

POST / HTTP/1.1
Accept: application/json, */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 22
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/0.9.9
x-sora-target: Sora_20170814.StopForwardingRtp

{
    "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: Fri, 25 Aug 2017 13:32:48 GMT
server: Cowboy

{
    "channel_id": "sora"
}

スポットライト API

警告

スポットライト機能は実験的機能のため、正式版では仕様が変更される可能性があります

指定した参加者にスポットライトをフォーカスし続ける

サービス

Sora

バージョン

20200807

オペレーション

FocusSpotlightFixed

x-sora-target

Sora_20200807.FocusSpotlightFixed

指定した Connection ID のクライアントに常にフォーカスが当たるようにします。 これは UnfocusSpotlight API が呼ばれるまで当たり続けます。

キー

channel_id

string

connection_id

string

$ http POST 127.0.0.1:3000/ x-sora-target:Sora_20200807.FocusSpotlightFixed \
    channel_id=sora connection_id=7QSNT842FS0J9E6BZDBC2DRYY8 -vvv
POST / HTTP/1.1
Accept: application/json, */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 69
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.0.0
x-sora-target: Sora_20200807.FocusSpotlightFixed

{
    "channel_id": "sora",
    "connection_id": "7QSNT842FS0J9E6BZDBC2DRYY8"
}

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, 09 Sep 2020 08:27:57 GMT
server: Cowboy

{
    "channel_id": "sora",
    "connection_id": "7QSNT842FS0J9E6BZDBC2DRYY8"
}

指定した参加者にスポットライトをフォーカスする

サービス

Sora

バージョン

20200807

オペレーション

FocusSpotlight

x-sora-target

Sora_20200807.FocusSpotlight

指定した Connection ID のクライアントを強制的にフォーカスが当たった状態にします。

キー

channel_id

string

connection_id

string

$ http POST 127.0.0.1:3000/ x-sora-target:Sora_20200807.FocusSpotlight \
    channel_id=sora connection_id=74Z2G1JS7S67DE226T8R1H3YGW -vvv
POST / HTTP/1.1
Accept: application/json, */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 69
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.0.0
x-sora-target: Sora_20200807.FocusSpotlight

{
    "channel_id": "sora",
    "connection_id": "74Z2G1JS7S67DE226T8R1H3YGW"
}

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, 09 Sep 2020 08:33:54 GMT
server: Cowboy

{
    "channel_id": "sora",
    "connection_id": "74Z2G1JS7S67DE226T8R1H3YGW"
}

指定した参加者からスポットライトのフォーカスを外す

サービス

Sora

バージョン

20200807

オペレーション

UnfocusSpotlight

x-sora-target

Sora_20200807.UnfocusSpotlight

指定した Connection ID のフォーカスを外します。

この API は FocusSpotlightFixed でフォーカスを当て続けてているのを解除する場合にも利用します。

キー

channel_id

string

connection_id

string

$ http POST 127.0.0.1:3000/ x-sora-target:Sora_20200807.UnfocusSpotlight \
    channel_id=sora connection_id=74Z2G1JS7S67DE226T8R1H3YGW -vvv
POST / HTTP/1.1
Accept: application/json, */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 69
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.0.0
x-sora-target: Sora_20200807.UnfocusSpotlight

{
    "channel_id": "sora",
    "connection_id": "74Z2G1JS7S67DE226T8R1H3YGW"
}

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, 09 Sep 2020 08:34:56 GMT
server: Cowboy

{
    "channel_id": "sora",
    "connection_id": "74Z2G1JS7S67DE226T8R1H3YGW"
}

スポットライトのフォーカス数を変更する

サービス

Sora

バージョン

20200807

オペレーション

ChangeSpotlightNumber

x-sora-target

Sora_20200807.ChangeSpotlightNumber

フォーカスする最大数を変更します。最小は 1 で最大は 8 です

フォーカス変更後に参加する場合で spotlight_number を指定する場合は 変更後の値 を指定する必要があります。

キー

channel_id

string

spotlight_number

integer (1 ~ 8)

$ http POST 127.0.0.1:3000/ x-sora-target:Sora_20200807.ChangeSpotlightNumber \
    channel_id=sora spotlight_number:=1 -vvv
POST / HTTP/1.1
Accept: application/json, */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 45
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.0.0
x-sora-target: Sora_20200807.ChangeSpotlightNumber

{
    "channel_id": "sora",
    "spotlight_number": 1
}

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: 42
content-type: application/json
date: Wed, 09 Sep 2020 08:35:36 GMT
server: Cowboy

{
    "channel_id": "sora",
    "spotlight_number": 1
}

サイマルキャスト API

警告

サイマルキャスト機能は実験的機能のため、正式版では仕様が変更される可能性があります

指定した視聴者の受信する RTP ストリームの rid をリクエストする

サービス

Sora

バージョン

20201005

オペレーション

RequestRtpStream

x-sora-target

Sora_20201005.RequestRtpStream

キー

channel_id

string

recv_connection_id

string

send_connection_id (オプション)

string

rid

string (r0 | r1 | r2)

r1 までしか配信されていない場合に、r2 をリクエストした場合は r1 を受信し始めます。

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20201005.RequestRtpStream \
    channel_id=sora \
    recv_connection_id=4EVK3MN5Z17GB62RE5TGD045ZM \
    send_connection_id=EKNQ103WRD4ZZ74B6TKRM9YK78 \
    rid=r1 \
    -vvv
POST / HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 139
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.2.0
x-sora-target: Sora_20201005.RequestRtpStream

{
    "channel_id": "sora",
    "recv_connection_id": "4EVK3MN5Z17GB62RE5TGD045ZM",
    "rid": "r1",
    "send_connection_id": "EKNQ103WRD4ZZ74B6TKRM9YK78"
}

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: 132
content-type: application/json
date: Wed, 25 Nov 2020 09:31:11 GMT
server: Cowboy

{
    "channel_id": "sora",
    "recv_connection_id": "4EVK3MN5Z17GB62RE5TGD045ZM",
    "rid": "r1",
    "send_connection_id": "EKNQ103WRD4ZZ74B6TKRM9YK78"
}

指定した視聴者の受信する RTP ストリームの rid をリセットする

サービス

Sora

バージョン

20201005

オペレーション

ResetRtpStream

x-sora-target

Sora_20201005.ResetRtpStream

キー

channel_id

string

recv_connection_id

string

send_connection_id (オプション)

string

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20201005.ResetRtpStream \
    channel_id=sora \
    recv_connection_id=4EVK3MN5Z17GB62RE5TGD045ZM \
    send_connection_id=EKNQ103WRD4ZZ74B6TKRM9YK78 \
    -vvv
POST / HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 126
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.2.0
x-sora-target: Sora_20201005.ResetRtpStream

{
    "channel_id": "sora",
    "recv_connection_id": "4EVK3MN5Z17GB62RE5TGD045ZM",
    "send_connection_id": "EKNQ103WRD4ZZ74B6TKRM9YK78"
}

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: 121
content-type: application/json
date: Wed, 25 Nov 2020 09:31:57 GMT
server: Cowboy

{
    "channel_id": "sora",
    "recv_connection_id": "4EVK3MN5Z17GB62RE5TGD045ZM",
    "send_connection_id": "EKNQ103WRD4ZZ74B6TKRM9YK78"
}

シグナリング通知メタデータ拡張 API

警告

この API は実験的機能のため、正式版では仕様が変更される可能性があります

指定したチャネルのメタデータ一覧を取得する

サービス

Sora

バージョン

20201124

オペレーション

ListSignalingNotifyMetadata

x-sora-target

Sora_20201124.ListSignalingNotifyMetadata

指定したチャネルの全ての接続のメタデータをリストで返します。リストの中には connection_idclient_idmetadata をキーとしたオブジェクトがリストで入ってきます。順番保証はしません。

キー

channel_id

string

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20201124.ListSignalingNotifyMetadata \
    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_20201124.ListSignalingNotifyMetadata

{
    "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: 111
content-type: application/json
date: Thu, 26 Nov 2020 03:45:25 GMT
server: Cowboy

[
    {
        "client_id": "V3Q452QQBD5TQ6ZQDMTEDKA07C",
        "connection_id": "V3Q452QQBD5TQ6ZQDMTEDKA07C",
        "metadata": {
            "abc": 10
        }
    }
]

指定した接続のメタデータを取得する

サービス

Sora

バージョン

20201124

オペレーション

GetSignalingNotifyMetadata

x-sora-target

Sora_20201124.GetSignalingNotifyMetadata

キー

channel_id

string

connection_id

string

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20201124.GetSignalingNotifyMetadata \
    channel_id=sora \
    connection_id=0FQE5EA5YN3FS13P01QZ1JG8R0 \
    -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.2.0
x-sora-target: Sora_20201124.GetSignalingNotifyMetadata

{
    "channel_id": "sora",
    "connection_id": "0FQE5EA5YN3FS13P01QZ1JG8R0"
}

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: 13
content-type: application/json
date: Thu, 26 Nov 2020 03:48:44 GMT
server: Cowboy

{
    "abc": "efg"
}

指定した接続のメタデータを作成する

サービス

Sora

バージョン

20201124

オペレーション

PutSignalingNotifyMetadata

x-sora-target

Sora_20201124.PutSignalingNotifyMetadata

キー

channel_id

string

connection_id

string

metadata

object

push (オプション)

boolean

指定した接続のメタデータを作成します。メタデータがすでにあった場合は更新します。 追加したあとのメタデータが値として返ってきます。

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20201124.PutSignalingNotifyMetadata \
    channel_id=sora \
    connection_id=0FQE5EA5YN3FS13P01QZ1JG8R0 \
    metadata:='{"abc": "efg"}' \
    -vvv
POST / HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 97
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.2.0
x-sora-target: Sora_20201124.PutSignalingNotifyMetadata

{
    "channel_id": "sora",
    "connection_id": "0FQE5EA5YN3FS13P01QZ1JG8R0",
    "metadata": {
        "abc": "efg"
    }
}

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: 13
content-type: application/json
date: Thu, 26 Nov 2020 03:47:52 GMT
server: Cowboy

{
    "abc": "efg"
}

指定した接続のメタデータを削除する

サービス

Sora

バージョン

20201124

オペレーション

DeleteSignalingNotifyMetadata

x-sora-target

Sora_20201124.DeleteSignalingNotifyMetadata

キー

channel_id

string

connection_id

string

push (オプション)

boolean

指定した接続のメタデータを削除します。メタデータが空だったとしてもエラーにはなりません。 削除されるまえのメタデータが値として返ってきます。

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20201124.DeleteSignalingNotifyMetadata \
    channel_id=sora \
    connection_id=0FQE5EA5YN3FS13P01QZ1JG8R0 \
    -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.2.0
x-sora-target: Sora_20201124.DeleteSignalingNotifyMetadata

{
    "channel_id": "sora",
    "connection_id": "0FQE5EA5YN3FS13P01QZ1JG8R0"
}

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: 13
content-type: application/json
date: Thu, 26 Nov 2020 03:51:48 GMT
server: Cowboy

{
    "abc": "efg"
}

指定した接続のメタデータ項目を作成または更新する

サービス

Sora

バージョン

20201124

オペレーション

PutSignalingNotifyMetadataItem

x-sora-target

Sora_20201124.PutSignalingNotifyMetadataItem

キー

channel_id

string

connection_id

string

key

string

value

json

push (オプション)

boolean

key/value で指定したメタデータ項目を追加します。その項目が既にあった場合は更新します。 追加したあとのメタデータが値として返ってきます。

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20201124.PutSignalingNotifyMetadataItem \
    channel_id=sora \
    connection_id=0FQE5EA5YN3FS13P01QZ1JG8R0 \
    key=abc \
    value=efg \
    -vvv
POST / HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 99
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.2.0
x-sora-target: Sora_20201124.PutSignalingNotifyMetadataItem

{
    "channel_id": "sora",
    "connection_id": "0FQE5EA5YN3FS13P01QZ1JG8R0",
    "key": "abc",
    "value": "efg"
}

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: 13
content-type: application/json
date: Thu, 26 Nov 2020 03:51:48 GMT
server: Cowboy

{
    "abc": "efg"
}

push を有効にした場合は、そのチャネルの全てのクライアントに以下のようなプッシュ通知が送られます。

{
    "type": "push",
    "data": {
        "action": "PutMetadataItem",
        "connection_id": "0FQE5EA5YN3FS13P01QZ1JG8R0",
        "key": "abc",
        "type": "signaling_notify_metadata_ext",
        "value": "efg"
    }
}
  • action

    • 呼ばれた API 名

  • connection_id

    • シグナリング通知メタデータの項目が変更された接続の ID

  • key

    • シグナリング通知メタデータの項目が変更されたキー

  • value

    • シグナリング通知メタデータの項目が変更されたバリュー

指定した接続のメタデータ項目を削除する

サービス

Sora

バージョン

20201124

オペレーション

DeleteSignalingNotifyMetadataItem

x-sora-target

Sora_20201124.DeleteSignalingNotifyMetadataItem

キー

channel_id

string

connection_id

string

key

string

push (オプション)

boolean

key で指定したメタデータ項目を削除します。その項目がなかったとしてもエラーにはなりません。 削除されたあとのメタデータが値として返ってきます。

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20201124.DeleteSignalingNotifyMetadataItem \
    channel_id=sora \
    connection_id=0FQE5EA5YN3FS13P01QZ1JG8R0 \
    key=abc \
    push:=true \
    -vvv
POST / HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 97
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.2.0
x-sora-target: Sora_20201124.DeleteSignalingNotifyMetadataItem

{
    "channel_id": "sora",
    "connection_id": "0FQE5EA5YN3FS13P01QZ1JG8R0",
    "key": "abc",
    "push": true
}

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: 2
content-type: application/json
date: Thu, 26 Nov 2020 03:54:50 GMT
server: Cowboy

{}

RTP ストリーム停止/再開 API

警告

この API は実験的機能のため、正式版では仕様が変更される可能性があります

指定した接続からのストリームを停止する

現時点では映像のみを停止します

サービス

Sora

バージョン

20200401

オペレーション

PauseRtpStream

x-sora-target

Sora_20200401.PauseRtpStream

この API はマルチストリーム、サイマルキャスト、スポットライトで利用できます。

キー

channel_id

string

recv_connection_id

string

send_connection_id

string

  • recv_connection_id

    • RTP ストリームの受信を停止する接続の connection_id を指定します

  • send_connection_id

    • 受信を停止する RTP ストリームを配信している接続の connection_id を指定します

映像自体は Sora までは届いていますが、実際の配信が一時停止されるという仕組みになっています。

$ http POST 127.0.0.1:3000/ x-sora-target:Sora_20200401.PauseRtpStream \
      channel_id=sora \
      recv_connection_id=VTGYC92AZX6M72K860BPREFTMC \
      send_connection_id=3X0W1C23KS1TQAAYMKA9TXJS4G \
      -vvv
POST / HTTP/1.1
Accept: application/json, */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 121
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.0.0
x-sora-target: Sora_20200401.PauseRtpStream

{
    "channel_id": "sora",
    "recv_connection_id": "VTGYC92AZX6M72K860BPREFTMC",
    "send_connection_id": "3X0W1C23KS1TQAAYMKA9TXJS4G"
}

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: 121
content-type: application/json
date: Thu, 16 Apr 2020 02:06:39 GMT
server: Cowboy

{
    "channel_id": "sora",
    "recv_connection_id": "VTGYC92AZX6M72K860BPREFTMC",
    "send_connection_id": "3X0W1C23KS1TQAAYMKA9TXJS4G"
}

指定した接続からのストリームを再開する

サービス

Sora

バージョン

20200401

オペレーション

ResumeRtpStream

x-sora-target

Sora_20200401.ResumeRtpStream

この API はマルチストリーム、サイマルキャスト、スポットライトで利用できます。

キー

channel_id

string

recv_connection_id

string

send_connection_id

string

  • recv_connection_id

    • RTP ストリームの受信を再開する接続の connection_id を指定します

  • send_connection_id

    • 受信を停止している RTP ストリームを配信している接続の connection_id を指定します

$ http POST 127.0.0.1:3000/ x-sora-target:Sora_20200401.ResumeRtpStream \
      channel_id=sora \
      recv_connection_id=VTGYC92AZX6M72K860BPREFTMC \
      send_connection_id=3X0W1C23KS1TQAAYMKA9TXJS4G \
      -vvv
POST / HTTP/1.1
Accept: application/json, */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 121
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.0.0
x-sora-target: Sora_20200401.ResumeRtpStream

{
    "channel_id": "sora",
    "recv_connection_id": "VTGYC92AZX6M72K860BPREFTMC",
    "send_connection_id": "3X0W1C23KS1TQAAYMKA9TXJS4G"
}

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: 121
content-type: application/json
date: Thu, 16 Apr 2020 02:07:27 GMT
server: Cowboy

{
    "channel_id": "sora",
    "recv_connection_id": "VTGYC92AZX6M72K860BPREFTMC",
    "send_connection_id": "3X0W1C23KS1TQAAYMKA9TXJS4G"
}

指定したチャネルの停止しているストリーム一覧を返します

サービス

Sora

バージョン

20200401

オペレーション

ListPauseRtpStreams

x-sora-target

Sora_20200401.ListPauseRtpStreams

キー

channel_id

string

$ http POST 127.0.0.1:3000/ x-sora-target:Sora_20200401.ListPauseRtpStreams \
    channel_id=sora \
    -vvv
POST / HTTP/1.1
Accept: application/json, */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 22
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.0.0
x-sora-target: Sora_20200401.ListPauseRtpStreams

{
    "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: 111
content-type: application/json
date: Thu, 09 Apr 2020 07:10:18 GMT
server: Cowboy

[
    {
        "channel_id": "sora",
        "recv_connection_id": "G8AN156DSD3DBBN4P15VJ74QRW",
        "role": "sendrecv",
        "send_connection_id": "47YZ3NYNRN2CS5MW2W8V28W6QW"
    }
]

統計 API

統計情報を取得する

警告

この API は実験的機能のため、正式版では仕様が変更される可能性があります

サービス

Sora

バージョン

20171010

オペレーション

GetStatsReport

x-sora-target

Sora_20171010.GetStatsReport

Sora が起動している間の統計情報を取得することができます。この統計情報は Sora を止めたり再起動したりすることでクリアされますので注意してください。

レスポンス項目

  • total_connection_created

    • 現在までの接続が作成された数

  • total_connection_updated

    • 現在までの接続が更新された数

  • total_connection_destroyed

    • 現在までの接続が破棄された数

  • total_successful_connections

    • 現在までの接続が成功した数

  • total_ongoing_connections

    • 現在接続している数

  • total_failed_connections

    • 現在までの接続が失敗した数

  • total_duration_sec

    • 現在までの合計接続時間 (秒)

  • total_turn_udp_connections

    • 現在までの TURN-UDP での接続数

  • total_turn_tcp_connections

    • 現在までの TURN-TCP または TURN-TLS での接続数

  • average_duration_sec

    • 平均接続時間 (秒)

  • average_setup_time_msec

    • 平均セットアップ時間 (ミリ秒)

$ http POST 127.0.0.1:3000/ \
    x-sora-target:Sora_20171010.GetStatsReport \
    -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/0.9.9
x-sora-target: Sora_20171010.GetStatsReport



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: 172
content-type: application/json
date: Tue, 10 Oct 2017 10:23:22 GMT
server: Cowboy

{
    "average_duration_sec": 127,
    "average_setup_time_msec": 358,
    "total_connection_created": 100,
    "total_connection_destroyed": 100,
    "total_connection_updated": 174,
    "total_duration_sec": 12769,
    "total_failed_connections": 80,
    "total_ongoing_connections": 0,
    "total_successful_connections": 100,
    "total_turn_tcp_connections": 2,
    "total_turn_udp_connections": 98
}

リモート統計情報 API

警告

この API は実験的機能のため、正式版では仕様が変更される可能性があります

統計情報更新のタイミングについて

この統計情報は、シグナリングで死活監視用の Pong メッセージに含まれてくるクライアント統計情報の最新の値を返します。

Ping メッセージは 5 秒間隔で Sora から送られるため、ネットワークが正常であれば Pong メッセージが返ってくるのは 5 秒間隔となります。 そのため、統計情報は 5 秒間隔で更新されます。

全てのリモート統計情報を取得する

サービス

Sora

バージョン

20200225

オペレーション

GetAllRemoteStats

x-sora-target

Sora_20200225.GetAllRemoteStats

$ http POST 127.0.0.1:3000/ x-sora-target:Sora_20200225.GetAllRemoteStats -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.0.0
x-sora-target: Sora_20200225.GetAllRemoteStats



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: 9444
content-type: application/json
date: Thu, 09 Apr 2020 07:31:33 GMT
server: Cowboy

[
    {
        "channel_id": "sora",
        "connection_id": "HMRVPQEXJX03D3B3WE778SJGRC",
        "remote_stats": [
            {
                "audioLevel": 0,
                "id": "RTCAudioSource_1",
                "kind": "audio",
                "timestamp": 1586417492054.487,
                "totalAudioEnergy": 0,
                "totalSamplesDuration": 24.930000000001098,
                "trackIdentifier": "8de161d9-c93f-4c8a-ab0e-c4cb1ed45543",
                "type": "media-source"
            },
            {
                "base64Certificate": "MIIBFjCBvaADAgECAgkAvREZhM8QonowCgYIKoZIzj0EAwIwETEPMA0GA1UEAwwGV2ViUlRDMB4XDTIwMDQwODA3MzEwN1oXDTIwMDUwOTA3MzEwN1owETEPMA0GA1UEAwwGV2ViUlRDMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEObaQG5SUlwAfRydt90MtcSWPEqcD2bFOaeiS7kRuhK6Y3pdi2Y51OY9g03CJlfLRs/QO7FKSq0JmzZVNK1/fAjAKBggqhkjOPQQDAgNIADBFAiB24aTZEz60OXYKdaCjGRpaq23ssPBaWcUIg5gl6QyFqAIhAJrL8uVs6lJB8kuzY+8JF2eqHbw6GS36DEX8Iz2teQdP",
                "fingerprint": "1B:FD:64:BF:B3:9F:14:1D:B4:78:A7:DD:F6:62:8D:9E:D7:48:C8:56:D6:1B:6D:04:4D:CA:5D:DB:6A:B3:89:C3",
                "fingerprintAlgorithm": "sha-256",
                "id": "RTCCertificate_1B:FD:64:BF:B3:9F:14:1D:B4:78:A7:DD:F6:62:8D:9E:D7:48:C8:56:D6:1B:6D:04:4D:CA:5D:DB:6A:B3:89:C3",
                "timestamp": 1586417492054.487,
                "type": "certificate"
            },
            {
                "base64Certificate": "MIICHjCCAbugAwIBAgIGANT1xzg7MBQGCCqGSM49BAMCBggqhkjOPQMBBzBiMSAwHgYJKoZIhvcNAQkBFhFzb3JhQHNoaWd1cmVkby5qcDEYMBYGA1UEAwwPV2ViUlRDIFNGVSBTb3JhMQswCQYDVQQGEwJKUDEXMBUGA1UECgwOU2hpZ3VyZWRvIGluYy4wHhcNMjAwNDA4MjM1OTU5WhcNMjAwNDE2MjM1OTU5WjBiMSAwHgYJKoZIhvcNAQkBFhFzb3JhQHNoaWd1cmVkby5qcDEYMBYGA1UEAwwPV2ViUlRDIFNGVSBTb3JhMQswCQYDVQQGEwJKUDEXMBUGA1UECgwOU2hpZ3VyZWRvIGluYy4wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAR7ZWYKDfuQtwRhv1Nq9dKU6WJFc1h+3r3nU8yGqcWfK86CdDAGELs+l0g7BcDepxqAOPIaKHIqzpexB/CtNvnTo1MwUTAfBgNVHSMEGDAWgBSiuSarsmBIo/SqAa1/KISQW6Mn5TAdBgNVHQ4EFgQUorkmq7JgSKP0qgGtfyiEkFujJ+UwDwYDVR0TAQH/BAUwAwEB/zAUBggqhkjOPQQDAgYIKoZIzj0DAQcDRwAwRAIgDMUIcnpvrOoX3ThAOr289DJXGHiHKobhLQUZBhRd+YYCIBQp4hrXSkgXiyELOf2+kaaLNuwqQlKO6A6AWj90as54",
                "fingerprint": "FA:66:5F:F0:4B:10:F3:3C:71:26:A2:33:FF:C1:1B:D0:9E:C5:71:11:68:F3:41:82:84:11:8F:5D:D6:54:86:AE",
                "fingerprintAlgorithm": "sha-256",
                "id": "RTCCertificate_FA:66:5F:F0:4B:10:F3:3C:71:26:A2:33:FF:C1:1B:D0:9E:C5:71:11:68:F3:41:82:84:11:8F:5D:D6:54:86:AE",
                "timestamp": 1586417492054.487,
                "type": "certificate"
            },
            {
                "clockRate": 48000,
                "id": "RTCCodec_audio_u7Lulw_Inbound_109",
                "mimeType": "audio/opus",
                "payloadType": 109,
                "timestamp": 1586417492054.487,
                "type": "codec"
            },
            {
                "clockRate": 48000,
                "id": "RTCCodec_audio_u7Lulw_Outbound_109",
                "mimeType": "audio/opus",
                "payloadType": 109,
                "timestamp": 1586417492054.487,
                "type": "codec"
            },
            {
                "clockRate": 90000,
                "id": "RTCCodec_video_8IGSWf_Inbound_116",
                "mimeType": "video/red",
                "payloadType": 116,
                "timestamp": 1586417492054.487,
                "type": "codec"
            },
            {
                "clockRate": 90000,
                "id": "RTCCodec_video_8IGSWf_Inbound_117",
                "mimeType": "video/ulpfec",
                "payloadType": 117,
                "timestamp": 1586417492054.487,
                "type": "codec"
            },
            {
                "clockRate": 90000,
                "id": "RTCCodec_video_8IGSWf_Inbound_120",
                "mimeType": "video/VP9",
                "payloadType": 120,
                "timestamp": 1586417492054.487,
                "type": "codec"
            },
            {
                "clockRate": 90000,
                "id": "RTCCodec_video_8IGSWf_Inbound_96",
                "mimeType": "video/rtx",
                "payloadType": 96,
                "timestamp": 1586417492054.487,
                "type": "codec"
            },
            {
                "clockRate": 90000,
                "id": "RTCCodec_video_8IGSWf_Inbound_97",
                "mimeType": "video/rtx",
                "payloadType": 97,
                "timestamp": 1586417492054.487,
                "type": "codec"
            },
            {
                "clockRate": 90000,
                "id": "RTCCodec_video_8IGSWf_Outbound_116",
                "mimeType": "video/red",
                "payloadType": 116,
                "timestamp": 1586417492054.487,
                "type": "codec"
            },
            {
                "clockRate": 90000,
                "id": "RTCCodec_video_8IGSWf_Outbound_117",
                "mimeType": "video/ulpfec",
                "payloadType": 117,
                "timestamp": 1586417492054.487,
                "type": "codec"
            },
            {
                "clockRate": 90000,
                "id": "RTCCodec_video_8IGSWf_Outbound_120",
                "mimeType": "video/VP9",
                "payloadType": 120,
                "timestamp": 1586417492054.487,
                "type": "codec"
            },
            {
                "clockRate": 90000,
                "id": "RTCCodec_video_8IGSWf_Outbound_96",
                "mimeType": "video/rtx",
                "payloadType": 96,
                "timestamp": 1586417492054.487,
                "type": "codec"
            },
            {
                "clockRate": 90000,
                "id": "RTCCodec_video_8IGSWf_Outbound_97",
                "mimeType": "video/rtx",
                "payloadType": 97,
                "timestamp": 1586417492054.487,
                "type": "codec"
            },
            {
                "availableOutgoingBitrate": 500000,
                "bytesReceived": 7166,
                "bytesSent": 1590493,
                "consentRequestsSent": 13,
                "currentRoundTripTime": 0,
                "id": "RTCIceCandidatePair_kJFGYHCn_K+hhYOVG",
                "localCandidateId": "RTCIceCandidate_kJFGYHCn",
                "nominated": true,
                "priority": 179616219446525440,
                "remoteCandidateId": "RTCIceCandidate_K+hhYOVG",
                "requestsReceived": 5,
                "requestsSent": 1,
                "responsesReceived": 14,
                "responsesSent": 5,
                "state": "succeeded",
                "timestamp": 1586417492054.487,
                "totalRoundTripTime": 0.005,
                "transportId": "RTCTransport_audio_u7Lulw_1",
                "type": "candidate-pair",
                "writable": true
            },
            {
                "candidateType": "host",
                "deleted": false,
                "id": "RTCIceCandidate_K+hhYOVG",
                "ip": "192.168.1.6",
                "isRemote": true,
                "port": 59924,
                "priority": 2114002687,
                "protocol": "udp",
                "timestamp": 1586417492054.487,
                "transportId": "RTCTransport_audio_u7Lulw_1",
                "type": "remote-candidate"
            },
            {
                "candidateType": "relay",
                "deleted": false,
                "id": "RTCIceCandidate_kJFGYHCn",
                "ip": "203.0.113.1",
                "isRemote": false,
                "networkType": "wifi",
                "port": 11490,
                "priority": 41820159,
                "protocol": "udp",
                "relayProtocol": "udp",
                "timestamp": 1586417492054.487,
                "transportId": "RTCTransport_audio_u7Lulw_1",
                "type": "local-candidate"
            },
            {
                "bytesReceived": 0,
                "headerBytesReceived": 0,
                "id": "RTCInboundRTPAudioStream_1872341764",
                "isRemote": false,
                "jitter": 0,
                "kind": "audio",
                "mediaType": "audio",
                "packetsLost": 0,
                "packetsReceived": 0,
                "ssrc": 1872341764,
                "timestamp": 1586417492054.487,
                "transportId": "RTCTransport_audio_u7Lulw_1",
                "type": "inbound-rtp"
            },
            {
                "detached": false,
                "echoReturnLoss": -30,
                "echoReturnLossEnhancement": 0.17551203072071075,
                "ended": false,
                "id": "RTCMediaStreamTrack_sender_1",
                "kind": "audio",
                "mediaSourceId": "RTCAudioSource_1",
                "remoteSource": false,
                "timestamp": 1586417492054.487,
                "trackIdentifier": "8de161d9-c93f-4c8a-ab0e-c4cb1ed45543",
                "type": "track"
            },
            {
                "detached": false,
                "ended": false,
                "frameHeight": 480,
                "frameWidth": 640,
                "framesSent": 743,
                "hugeFramesSent": 1,
                "id": "RTCMediaStreamTrack_sender_2",
                "kind": "video",
                "mediaSourceId": "RTCVideoSource_2",
                "remoteSource": false,
                "timestamp": 1586417492054.487,
                "trackIdentifier": "034ef502-977d-47b5-b0dd-f8f2f9c3efd4",
                "type": "track"
            },
            {
                "id": "RTCMediaStream_YzrwqojxygQekopjqDgu02X6YXRhCKMxQ995",
                "streamIdentifier": "YzrwqojxygQekopjqDgu02X6YXRhCKMxQ995",
                "timestamp": 1586417492054.487,
                "trackIds": [
                    "RTCMediaStreamTrack_sender_1",
                    "RTCMediaStreamTrack_sender_2"
                ],
                "type": "stream"
            },
            {
                "bytesSent": 3738,
                "codecId": "RTCCodec_audio_u7Lulw_Outbound_109",
                "headerBytesSent": 29904,
                "id": "RTCOutboundRTPAudioStream_3503369952",
                "isRemote": false,
                "kind": "audio",
                "mediaSourceId": "RTCAudioSource_1",
                "mediaType": "audio",
                "packetsSent": 1246,
                "retransmittedBytesSent": 0,
                "retransmittedPacketsSent": 0,
                "ssrc": 3503369952,
                "timestamp": 1586417492054.487,
                "trackId": "RTCMediaStreamTrack_sender_1",
                "transportId": "RTCTransport_audio_u7Lulw_1",
                "type": "outbound-rtp"
            },
            {
                "bytesSent": 1489072,
                "codecId": "RTCCodec_video_8IGSWf_Outbound_120",
                "encoderImplementation": "libvpx",
                "firCount": 0,
                "framesEncoded": 743,
                "headerBytesSent": 35236,
                "id": "RTCOutboundRTPVideoStream_1584733228",
                "isRemote": false,
                "keyFramesEncoded": 1,
                "kind": "video",
                "mediaSourceId": "RTCVideoSource_2",
                "mediaType": "video",
                "nackCount": 16,
                "packetsSent": 1665,
                "pliCount": 0,
                "qpSum": 100700,
                "qualityLimitationReason": "none",
                "qualityLimitationResolutionChanges": 0,
                "retransmittedBytesSent": 0,
                "retransmittedPacketsSent": 0,
                "ssrc": 1584733228,
                "timestamp": 1586417492054.487,
                "totalEncodeTime": 1.982,
                "totalEncodedBytesTarget": 1562761,
                "totalPacketSendDelay": 43.955,
                "trackId": "RTCMediaStreamTrack_sender_2",
                "transportId": "RTCTransport_audio_u7Lulw_1",
                "type": "outbound-rtp"
            },
            {
                "dataChannelsClosed": 0,
                "dataChannelsOpened": 0,
                "id": "RTCPeerConnection",
                "timestamp": 1586417492054.487,
                "type": "peer-connection"
            },
            {
                "codecId": "RTCCodec_audio_u7Lulw_Outbound_109",
                "id": "RTCRemoteInboundRtpAudioStream_3503369952",
                "jitter": 0.002125,
                "kind": "audio",
                "localId": "RTCOutboundRTPAudioStream_3503369952",
                "packetsLost": 9,
                "roundTripTime": 0.001,
                "ssrc": 3503369952,
                "timestamp": 1586417491669.581,
                "transportId": "RTCTransport_audio_u7Lulw_1",
                "type": "remote-inbound-rtp"
            },
            {
                "codecId": "RTCCodec_video_8IGSWf_Outbound_120",
                "id": "RTCRemoteInboundRtpVideoStream_1584733228",
                "jitter": 0.005044444444444444,
                "kind": "video",
                "localId": "RTCOutboundRTPVideoStream_1584733228",
                "packetsLost": 0,
                "roundTripTime": 0.001,
                "ssrc": 1584733228,
                "timestamp": 1586417491669.512,
                "transportId": "RTCTransport_audio_u7Lulw_1",
                "type": "remote-inbound-rtp"
            },
            {
                "bytesReceived": 7166,
                "bytesSent": 1590493,
                "dtlsCipher": "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
                "dtlsState": "connected",
                "id": "RTCTransport_audio_u7Lulw_1",
                "localCertificateId": "RTCCertificate_1B:FD:64:BF:B3:9F:14:1D:B4:78:A7:DD:F6:62:8D:9E:D7:48:C8:56:D6:1B:6D:04:4D:CA:5D:DB:6A:B3:89:C3",
                "remoteCertificateId": "RTCCertificate_FA:66:5F:F0:4B:10:F3:3C:71:26:A2:33:FF:C1:1B:D0:9E:C5:71:11:68:F3:41:82:84:11:8F:5D:D6:54:86:AE",
                "selectedCandidatePairChanges": 1,
                "selectedCandidatePairId": "RTCIceCandidatePair_kJFGYHCn_K+hhYOVG",
                "srtpCipher": "AES_CM_128_HMAC_SHA1_80",
                "timestamp": 1586417492054.487,
                "tlsVersion": "FEFD",
                "type": "transport"
            },
            {
                "framesPerSecond": 29,
                "height": 480,
                "id": "RTCVideoSource_2",
                "kind": "video",
                "timestamp": 1586417492054.487,
                "trackIdentifier": "034ef502-977d-47b5-b0dd-f8f2f9c3efd4",
                "type": "media-source",
                "width": 640
            }
        ],
        "timestamp": "2020-04-09T07:31:32.056Z"
    }
]

指定したチャネルのリモート統計情報を取得する

サービス

Sora

バージョン

20200225

オペレーション

GetChannelRemoteStats

x-sora-target

Sora_20200225.GetChannelRemoteStats

キー

channel_id

string

$ http POST 127.0.0.1:3000/ x-sora-target:Sora_20200225.GetChannelRemoteStats \
    channel_id=sora \
    -vvv
POST / HTTP/1.1
Accept: application/json, */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 22
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.0.0
x-sora-target: Sora_20200225.GetChannelRemoteStats

{
    "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: 9479
content-type: application/json
date: Thu, 09 Apr 2020 07:32:36 GMT
server: Cowboy

[
    {
        "channel_id": "sora",
        "connection_id": "HMRVPQEXJX03D3B3WE778SJGRC",
        "remote_stats": [
            {
                "audioLevel": 0,
                "id": "RTCAudioSource_1",
                "kind": "audio",
                "timestamp": 1586417557067.526,
                "totalAudioEnergy": 0,
                "totalSamplesDuration": 89.95000000000911,
                "trackIdentifier": "8de161d9-c93f-4c8a-ab0e-c4cb1ed45543",
                "type": "media-source"
            },
            {
                "base64Certificate": "MIIBFjCBvaADAgECAgkAvREZhM8QonowCgYIKoZIzj0EAwIwETEPMA0GA1UEAwwGV2ViUlRDMB4XDTIwMDQwODA3MzEwN1oXDTIwMDUwOTA3MzEwN1owETEPMA0GA1UEAwwGV2ViUlRDMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEObaQG5SUlwAfRydt90MtcSWPEqcD2bFOaeiS7kRuhK6Y3pdi2Y51OY9g03CJlfLRs/QO7FKSq0JmzZVNK1/fAjAKBggqhkjOPQQDAgNIADBFAiB24aTZEz60OXYKdaCjGRpaq23ssPBaWcUIg5gl6QyFqAIhAJrL8uVs6lJB8kuzY+8JF2eqHbw6GS36DEX8Iz2teQdP",
                "fingerprint": "1B:FD:64:BF:B3:9F:14:1D:B4:78:A7:DD:F6:62:8D:9E:D7:48:C8:56:D6:1B:6D:04:4D:CA:5D:DB:6A:B3:89:C3",
                "fingerprintAlgorithm": "sha-256",
                "id": "RTCCertificate_1B:FD:64:BF:B3:9F:14:1D:B4:78:A7:DD:F6:62:8D:9E:D7:48:C8:56:D6:1B:6D:04:4D:CA:5D:DB:6A:B3:89:C3",
                "timestamp": 1586417557067.526,
                "type": "certificate"
            },
            {
                "base64Certificate": "MIICHjCCAbugAwIBAgIGANT1xzg7MBQGCCqGSM49BAMCBggqhkjOPQMBBzBiMSAwHgYJKoZIhvcNAQkBFhFzb3JhQHNoaWd1cmVkby5qcDEYMBYGA1UEAwwPV2ViUlRDIFNGVSBTb3JhMQswCQYDVQQGEwJKUDEXMBUGA1UECgwOU2hpZ3VyZWRvIGluYy4wHhcNMjAwNDA4MjM1OTU5WhcNMjAwNDE2MjM1OTU5WjBiMSAwHgYJKoZIhvcNAQkBFhFzb3JhQHNoaWd1cmVkby5qcDEYMBYGA1UEAwwPV2ViUlRDIFNGVSBTb3JhMQswCQYDVQQGEwJKUDEXMBUGA1UECgwOU2hpZ3VyZWRvIGluYy4wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAR7ZWYKDfuQtwRhv1Nq9dKU6WJFc1h+3r3nU8yGqcWfK86CdDAGELs+l0g7BcDepxqAOPIaKHIqzpexB/CtNvnTo1MwUTAfBgNVHSMEGDAWgBSiuSarsmBIo/SqAa1/KISQW6Mn5TAdBgNVHQ4EFgQUorkmq7JgSKP0qgGtfyiEkFujJ+UwDwYDVR0TAQH/BAUwAwEB/zAUBggqhkjOPQQDAgYIKoZIzj0DAQcDRwAwRAIgDMUIcnpvrOoX3ThAOr289DJXGHiHKobhLQUZBhRd+YYCIBQp4hrXSkgXiyELOf2+kaaLNuwqQlKO6A6AWj90as54",
                "fingerprint": "FA:66:5F:F0:4B:10:F3:3C:71:26:A2:33:FF:C1:1B:D0:9E:C5:71:11:68:F3:41:82:84:11:8F:5D:D6:54:86:AE",
                "fingerprintAlgorithm": "sha-256",
                "id": "RTCCertificate_FA:66:5F:F0:4B:10:F3:3C:71:26:A2:33:FF:C1:1B:D0:9E:C5:71:11:68:F3:41:82:84:11:8F:5D:D6:54:86:AE",
                "timestamp": 1586417557067.526,
                "type": "certificate"
            },
            {
                "clockRate": 48000,
                "id": "RTCCodec_audio_u7Lulw_Inbound_109",
                "mimeType": "audio/opus",
                "payloadType": 109,
                "timestamp": 1586417557067.526,
                "type": "codec"
            },
            {
                "clockRate": 48000,
                "id": "RTCCodec_audio_u7Lulw_Outbound_109",
                "mimeType": "audio/opus",
                "payloadType": 109,
                "timestamp": 1586417557067.526,
                "type": "codec"
            },
            {
                "clockRate": 90000,
                "id": "RTCCodec_video_8IGSWf_Inbound_116",
                "mimeType": "video/red",
                "payloadType": 116,
                "timestamp": 1586417557067.526,
                "type": "codec"
            },
            {
                "clockRate": 90000,
                "id": "RTCCodec_video_8IGSWf_Inbound_117",
                "mimeType": "video/ulpfec",
                "payloadType": 117,
                "timestamp": 1586417557067.526,
                "type": "codec"
            },
            {
                "clockRate": 90000,
                "id": "RTCCodec_video_8IGSWf_Inbound_120",
                "mimeType": "video/VP9",
                "payloadType": 120,
                "timestamp": 1586417557067.526,
                "type": "codec"
            },
            {
                "clockRate": 90000,
                "id": "RTCCodec_video_8IGSWf_Inbound_96",
                "mimeType": "video/rtx",
                "payloadType": 96,
                "timestamp": 1586417557067.526,
                "type": "codec"
            },
            {
                "clockRate": 90000,
                "id": "RTCCodec_video_8IGSWf_Inbound_97",
                "mimeType": "video/rtx",
                "payloadType": 97,
                "timestamp": 1586417557067.526,
                "type": "codec"
            },
            {
                "clockRate": 90000,
                "id": "RTCCodec_video_8IGSWf_Outbound_116",
                "mimeType": "video/red",
                "payloadType": 116,
                "timestamp": 1586417557067.526,
                "type": "codec"
            },
            {
                "clockRate": 90000,
                "id": "RTCCodec_video_8IGSWf_Outbound_117",
                "mimeType": "video/ulpfec",
                "payloadType": 117,
                "timestamp": 1586417557067.526,
                "type": "codec"
            },
            {
                "clockRate": 90000,
                "id": "RTCCodec_video_8IGSWf_Outbound_120",
                "mimeType": "video/VP9",
                "payloadType": 120,
                "timestamp": 1586417557067.526,
                "type": "codec"
            },
            {
                "clockRate": 90000,
                "id": "RTCCodec_video_8IGSWf_Outbound_96",
                "mimeType": "video/rtx",
                "payloadType": 96,
                "timestamp": 1586417557067.526,
                "type": "codec"
            },
            {
                "clockRate": 90000,
                "id": "RTCCodec_video_8IGSWf_Outbound_97",
                "mimeType": "video/rtx",
                "payloadType": 97,
                "timestamp": 1586417557067.526,
                "type": "codec"
            },
            {
                "availableOutgoingBitrate": 500000,
                "bytesReceived": 23270,
                "bytesSent": 5816552,
                "consentRequestsSent": 39,
                "currentRoundTripTime": 0.001,
                "id": "RTCIceCandidatePair_kJFGYHCn_K+hhYOVG",
                "localCandidateId": "RTCIceCandidate_kJFGYHCn",
                "nominated": true,
                "priority": 179616219446525440,
                "remoteCandidateId": "RTCIceCandidate_K+hhYOVG",
                "requestsReceived": 18,
                "requestsSent": 1,
                "responsesReceived": 40,
                "responsesSent": 18,
                "state": "succeeded",
                "timestamp": 1586417557067.526,
                "totalRoundTripTime": 0.02,
                "transportId": "RTCTransport_audio_u7Lulw_1",
                "type": "candidate-pair",
                "writable": true
            },
            {
                "candidateType": "host",
                "deleted": false,
                "id": "RTCIceCandidate_K+hhYOVG",
                "ip": "192.168.1.6",
                "isRemote": true,
                "port": 59924,
                "priority": 2114002687,
                "protocol": "udp",
                "timestamp": 1586417557067.526,
                "transportId": "RTCTransport_audio_u7Lulw_1",
                "type": "remote-candidate"
            },
            {
                "candidateType": "relay",
                "deleted": false,
                "id": "RTCIceCandidate_kJFGYHCn",
                "ip": "203.0.113.1",
                "isRemote": false,
                "networkType": "wifi",
                "port": 11490,
                "priority": 41820159,
                "protocol": "udp",
                "relayProtocol": "udp",
                "timestamp": 1586417557067.526,
                "transportId": "RTCTransport_audio_u7Lulw_1",
                "type": "local-candidate"
            },
            {
                "bytesReceived": 0,
                "headerBytesReceived": 0,
                "id": "RTCInboundRTPAudioStream_1872341764",
                "isRemote": false,
                "jitter": 0,
                "kind": "audio",
                "mediaType": "audio",
                "packetsLost": 0,
                "packetsReceived": 0,
                "ssrc": 1872341764,
                "timestamp": 1586417557067.526,
                "transportId": "RTCTransport_audio_u7Lulw_1",
                "type": "inbound-rtp"
            },
            {
                "detached": false,
                "echoReturnLoss": -30,
                "echoReturnLossEnhancement": 0.17551203072071075,
                "ended": false,
                "id": "RTCMediaStreamTrack_sender_1",
                "kind": "audio",
                "mediaSourceId": "RTCAudioSource_1",
                "remoteSource": false,
                "timestamp": 1586417557067.526,
                "trackIdentifier": "8de161d9-c93f-4c8a-ab0e-c4cb1ed45543",
                "type": "track"
            },
            {
                "detached": false,
                "ended": false,
                "frameHeight": 480,
                "frameWidth": 640,
                "framesSent": 2694,
                "hugeFramesSent": 1,
                "id": "RTCMediaStreamTrack_sender_2",
                "kind": "video",
                "mediaSourceId": "RTCVideoSource_2",
                "remoteSource": false,
                "timestamp": 1586417557067.526,
                "trackIdentifier": "034ef502-977d-47b5-b0dd-f8f2f9c3efd4",
                "type": "track"
            },
            {
                "id": "RTCMediaStream_YzrwqojxygQekopjqDgu02X6YXRhCKMxQ995",
                "streamIdentifier": "YzrwqojxygQekopjqDgu02X6YXRhCKMxQ995",
                "timestamp": 1586417557067.526,
                "trackIds": [
                    "RTCMediaStreamTrack_sender_1",
                    "RTCMediaStreamTrack_sender_2"
                ],
                "type": "stream"
            },
            {
                "bytesSent": 13491,
                "codecId": "RTCCodec_audio_u7Lulw_Outbound_109",
                "headerBytesSent": 107928,
                "id": "RTCOutboundRTPAudioStream_3503369952",
                "isRemote": false,
                "kind": "audio",
                "mediaSourceId": "RTCAudioSource_1",
                "mediaType": "audio",
                "packetsSent": 4497,
                "retransmittedBytesSent": 0,
                "retransmittedPacketsSent": 0,
                "ssrc": 3503369952,
                "timestamp": 1586417557067.526,
                "trackId": "RTCMediaStreamTrack_sender_1",
                "transportId": "RTCTransport_audio_u7Lulw_1",
                "type": "outbound-rtp"
            },
            {
                "bytesSent": 5450632,
                "codecId": "RTCCodec_video_8IGSWf_Outbound_120",
                "encoderImplementation": "libvpx",
                "firCount": 0,
                "framesEncoded": 2694,
                "headerBytesSent": 128156,
                "id": "RTCOutboundRTPVideoStream_1584733228",
                "isRemote": false,
                "keyFramesEncoded": 1,
                "kind": "video",
                "mediaSourceId": "RTCVideoSource_2",
                "mediaType": "video",
                "nackCount": 50,
                "packetsSent": 6059,
                "pliCount": 0,
                "qpSum": 341943,
                "qualityLimitationReason": "none",
                "qualityLimitationResolutionChanges": 0,
                "retransmittedBytesSent": 0,
                "retransmittedPacketsSent": 0,
                "ssrc": 1584733228,
                "timestamp": 1586417557067.526,
                "totalEncodeTime": 7.137,
                "totalEncodedBytesTarget": 5539369,
                "totalPacketSendDelay": 165.797,
                "trackId": "RTCMediaStreamTrack_sender_2",
                "transportId": "RTCTransport_audio_u7Lulw_1",
                "type": "outbound-rtp"
            },
            {
                "dataChannelsClosed": 0,
                "dataChannelsOpened": 0,
                "id": "RTCPeerConnection",
                "timestamp": 1586417557067.526,
                "type": "peer-connection"
            },
            {
                "codecId": "RTCCodec_audio_u7Lulw_Outbound_109",
                "id": "RTCRemoteInboundRtpAudioStream_3503369952",
                "jitter": 0.0022083333333333334,
                "kind": "audio",
                "localId": "RTCOutboundRTPAudioStream_3503369952",
                "packetsLost": 43,
                "roundTripTime": 0.001,
                "ssrc": 3503369952,
                "timestamp": 1586417556799.463,
                "transportId": "RTCTransport_audio_u7Lulw_1",
                "type": "remote-inbound-rtp"
            },
            {
                "codecId": "RTCCodec_video_8IGSWf_Outbound_120",
                "id": "RTCRemoteInboundRtpVideoStream_1584733228",
                "jitter": 0.004677777777777778,
                "kind": "video",
                "localId": "RTCOutboundRTPVideoStream_1584733228",
                "packetsLost": 0,
                "roundTripTime": 0.001,
                "ssrc": 1584733228,
                "timestamp": 1586417556799.403,
                "transportId": "RTCTransport_audio_u7Lulw_1",
                "type": "remote-inbound-rtp"
            },
            {
                "bytesReceived": 23270,
                "bytesSent": 5816552,
                "dtlsCipher": "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
                "dtlsState": "connected",
                "id": "RTCTransport_audio_u7Lulw_1",
                "localCertificateId": "RTCCertificate_1B:FD:64:BF:B3:9F:14:1D:B4:78:A7:DD:F6:62:8D:9E:D7:48:C8:56:D6:1B:6D:04:4D:CA:5D:DB:6A:B3:89:C3",
                "remoteCertificateId": "RTCCertificate_FA:66:5F:F0:4B:10:F3:3C:71:26:A2:33:FF:C1:1B:D0:9E:C5:71:11:68:F3:41:82:84:11:8F:5D:D6:54:86:AE",
                "selectedCandidatePairChanges": 1,
                "selectedCandidatePairId": "RTCIceCandidatePair_kJFGYHCn_K+hhYOVG",
                "srtpCipher": "AES_CM_128_HMAC_SHA1_80",
                "timestamp": 1586417557067.526,
                "tlsVersion": "FEFD",
                "type": "transport"
            },
            {
                "framesPerSecond": 30,
                "height": 480,
                "id": "RTCVideoSource_2",
                "kind": "video",
                "timestamp": 1586417557067.526,
                "trackIdentifier": "034ef502-977d-47b5-b0dd-f8f2f9c3efd4",
                "type": "media-source",
                "width": 640
            }
        ],
        "timestamp": "2020-04-09T07:32:37.069Z"
    }
]

指定した接続のリモート統計情報を取得する

サービス

Sora

バージョン

20200225

オペレーション

GetConnectionRemoteStats

x-sora-target

Sora_20200225.GetConnectionRemoteStats

キー

channel_id

string

connection_id

string

$ http POST 127.0.0.1:3000/ x-sora-target:Sora_20200225.GetConnectionRemoteStats \
    channel_id=sora \
    connection_id=HMRVPQEXJX03D3B3WE778SJGRC \
    -vvv
POST / HTTP/1.1
Accept: application/json, */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 69
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/2.0.0
x-sora-target: Sora_20200225.GetConnectionRemoteStats

{
    "channel_id": "sora",
    "connection_id": "HMRVPQEXJX03D3B3WE778SJGRC"
}

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: 9473
content-type: application/json
date: Thu, 09 Apr 2020 07:33:41 GMT
server: Cowboy

{
    "channel_id": "sora",
    "connection_id": "HMRVPQEXJX03D3B3WE778SJGRC",
    "stats": [
        {
            "audioLevel": 0,
            "id": "RTCAudioSource_1",
            "kind": "audio",
            "timestamp": 1586417622080.464,
            "totalAudioEnergy": 0,
            "totalSamplesDuration": 154.96000000000404,
            "trackIdentifier": "8de161d9-c93f-4c8a-ab0e-c4cb1ed45543",
            "type": "media-source"
        },
        {
            "base64Certificate": "MIIBFjCBvaADAgECAgkAvREZhM8QonowCgYIKoZIzj0EAwIwETEPMA0GA1UEAwwGV2ViUlRDMB4XDTIwMDQwODA3MzEwN1oXDTIwMDUwOTA3MzEwN1owETEPMA0GA1UEAwwGV2ViUlRDMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEObaQG5SUlwAfRydt90MtcSWPEqcD2bFOaeiS7kRuhK6Y3pdi2Y51OY9g03CJlfLRs/QO7FKSq0JmzZVNK1/fAjAKBggqhkjOPQQDAgNIADBFAiB24aTZEz60OXYKdaCjGRpaq23ssPBaWcUIg5gl6QyFqAIhAJrL8uVs6lJB8kuzY+8JF2eqHbw6GS36DEX8Iz2teQdP",
            "fingerprint": "1B:FD:64:BF:B3:9F:14:1D:B4:78:A7:DD:F6:62:8D:9E:D7:48:C8:56:D6:1B:6D:04:4D:CA:5D:DB:6A:B3:89:C3",
            "fingerprintAlgorithm": "sha-256",
            "id": "RTCCertificate_1B:FD:64:BF:B3:9F:14:1D:B4:78:A7:DD:F6:62:8D:9E:D7:48:C8:56:D6:1B:6D:04:4D:CA:5D:DB:6A:B3:89:C3",
            "timestamp": 1586417622080.464,
            "type": "certificate"
        },
        {
            "base64Certificate": "MIICHjCCAbugAwIBAgIGANT1xzg7MBQGCCqGSM49BAMCBggqhkjOPQMBBzBiMSAwHgYJKoZIhvcNAQkBFhFzb3JhQHNoaWd1cmVkby5qcDEYMBYGA1UEAwwPV2ViUlRDIFNGVSBTb3JhMQswCQYDVQQGEwJKUDEXMBUGA1UECgwOU2hpZ3VyZWRvIGluYy4wHhcNMjAwNDA4MjM1OTU5WhcNMjAwNDE2MjM1OTU5WjBiMSAwHgYJKoZIhvcNAQkBFhFzb3JhQHNoaWd1cmVkby5qcDEYMBYGA1UEAwwPV2ViUlRDIFNGVSBTb3JhMQswCQYDVQQGEwJKUDEXMBUGA1UECgwOU2hpZ3VyZWRvIGluYy4wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAR7ZWYKDfuQtwRhv1Nq9dKU6WJFc1h+3r3nU8yGqcWfK86CdDAGELs+l0g7BcDepxqAOPIaKHIqzpexB/CtNvnTo1MwUTAfBgNVHSMEGDAWgBSiuSarsmBIo/SqAa1/KISQW6Mn5TAdBgNVHQ4EFgQUorkmq7JgSKP0qgGtfyiEkFujJ+UwDwYDVR0TAQH/BAUwAwEB/zAUBggqhkjOPQQDAgYIKoZIzj0DAQcDRwAwRAIgDMUIcnpvrOoX3ThAOr289DJXGHiHKobhLQUZBhRd+YYCIBQp4hrXSkgXiyELOf2+kaaLNuwqQlKO6A6AWj90as54",
            "fingerprint": "FA:66:5F:F0:4B:10:F3:3C:71:26:A2:33:FF:C1:1B:D0:9E:C5:71:11:68:F3:41:82:84:11:8F:5D:D6:54:86:AE",
            "fingerprintAlgorithm": "sha-256",
            "id": "RTCCertificate_FA:66:5F:F0:4B:10:F3:3C:71:26:A2:33:FF:C1:1B:D0:9E:C5:71:11:68:F3:41:82:84:11:8F:5D:D6:54:86:AE",
            "timestamp": 1586417622080.464,
            "type": "certificate"
        },
        {
            "clockRate": 48000,
            "id": "RTCCodec_audio_u7Lulw_Inbound_109",
            "mimeType": "audio/opus",
            "payloadType": 109,
            "timestamp": 1586417622080.464,
            "type": "codec"
        },
        {
            "clockRate": 48000,
            "id": "RTCCodec_audio_u7Lulw_Outbound_109",
            "mimeType": "audio/opus",
            "payloadType": 109,
            "timestamp": 1586417622080.464,
            "type": "codec"
        },
        {
            "clockRate": 90000,
            "id": "RTCCodec_video_8IGSWf_Inbound_116",
            "mimeType": "video/red",
            "payloadType": 116,
            "timestamp": 1586417622080.464,
            "type": "codec"
        },
        {
            "clockRate": 90000,
            "id": "RTCCodec_video_8IGSWf_Inbound_117",
            "mimeType": "video/ulpfec",
            "payloadType": 117,
            "timestamp": 1586417622080.464,
            "type": "codec"
        },
        {
            "clockRate": 90000,
            "id": "RTCCodec_video_8IGSWf_Inbound_120",
            "mimeType": "video/VP9",
            "payloadType": 120,
            "timestamp": 1586417622080.464,
            "type": "codec"
        },
        {
            "clockRate": 90000,
            "id": "RTCCodec_video_8IGSWf_Inbound_96",
            "mimeType": "video/rtx",
            "payloadType": 96,
            "timestamp": 1586417622080.464,
            "type": "codec"
        },
        {
            "clockRate": 90000,
            "id": "RTCCodec_video_8IGSWf_Inbound_97",
            "mimeType": "video/rtx",
            "payloadType": 97,
            "timestamp": 1586417622080.464,
            "type": "codec"
        },
        {
            "clockRate": 90000,
            "id": "RTCCodec_video_8IGSWf_Outbound_116",
            "mimeType": "video/red",
            "payloadType": 116,
            "timestamp": 1586417622080.464,
            "type": "codec"
        },
        {
            "clockRate": 90000,
            "id": "RTCCodec_video_8IGSWf_Outbound_117",
            "mimeType": "video/ulpfec",
            "payloadType": 117,
            "timestamp": 1586417622080.464,
            "type": "codec"
        },
        {
            "clockRate": 90000,
            "id": "RTCCodec_video_8IGSWf_Outbound_120",
            "mimeType": "video/VP9",
            "payloadType": 120,
            "timestamp": 1586417622080.464,
            "type": "codec"
        },
        {
            "clockRate": 90000,
            "id": "RTCCodec_video_8IGSWf_Outbound_96",
            "mimeType": "video/rtx",
            "payloadType": 96,
            "timestamp": 1586417622080.464,
            "type": "codec"
        },
        {
            "clockRate": 90000,
            "id": "RTCCodec_video_8IGSWf_Outbound_97",
            "mimeType": "video/rtx",
            "payloadType": 97,
            "timestamp": 1586417622080.464,
            "type": "codec"
        },
        {
            "availableOutgoingBitrate": 500000,
            "bytesReceived": 39588,
            "bytesSent": 10044330,
            "consentRequestsSent": 64,
            "currentRoundTripTime": 0.001,
            "id": "RTCIceCandidatePair_kJFGYHCn_K+hhYOVG",
            "localCandidateId": "RTCIceCandidate_kJFGYHCn",
            "nominated": true,
            "priority": 179616219446525440,
            "remoteCandidateId": "RTCIceCandidate_K+hhYOVG",
            "requestsReceived": 31,
            "requestsSent": 1,
            "responsesReceived": 65,
            "responsesSent": 31,
            "state": "succeeded",
            "timestamp": 1586417622080.464,
            "totalRoundTripTime": 0.028,
            "transportId": "RTCTransport_audio_u7Lulw_1",
            "type": "candidate-pair",
            "writable": true
        },
        {
            "candidateType": "host",
            "deleted": false,
            "id": "RTCIceCandidate_K+hhYOVG",
            "ip": "192.168.1.6",
            "isRemote": true,
            "port": 59924,
            "priority": 2114002687,
            "protocol": "udp",
            "timestamp": 1586417622080.464,
            "transportId": "RTCTransport_audio_u7Lulw_1",
            "type": "remote-candidate"
        },
        {
            "candidateType": "relay",
            "deleted": false,
            "id": "RTCIceCandidate_kJFGYHCn",
            "ip": "203.0.113.1",
            "isRemote": false,
            "networkType": "wifi",
            "port": 11490,
            "priority": 41820159,
            "protocol": "udp",
            "relayProtocol": "udp",
            "timestamp": 1586417622080.464,
            "transportId": "RTCTransport_audio_u7Lulw_1",
            "type": "local-candidate"
        },
        {
            "bytesReceived": 0,
            "headerBytesReceived": 0,
            "id": "RTCInboundRTPAudioStream_1872341764",
            "isRemote": false,
            "jitter": 0,
            "kind": "audio",
            "mediaType": "audio",
            "packetsLost": 0,
            "packetsReceived": 0,
            "ssrc": 1872341764,
            "timestamp": 1586417622080.464,
            "transportId": "RTCTransport_audio_u7Lulw_1",
            "type": "inbound-rtp"
        },
        {
            "detached": false,
            "echoReturnLoss": -30,
            "echoReturnLossEnhancement": 0.17551203072071075,
            "ended": false,
            "id": "RTCMediaStreamTrack_sender_1",
            "kind": "audio",
            "mediaSourceId": "RTCAudioSource_1",
            "remoteSource": false,
            "timestamp": 1586417622080.464,
            "trackIdentifier": "8de161d9-c93f-4c8a-ab0e-c4cb1ed45543",
            "type": "track"
        },
        {
            "detached": false,
            "ended": false,
            "frameHeight": 480,
            "frameWidth": 640,
            "framesSent": 4642,
            "hugeFramesSent": 2,
            "id": "RTCMediaStreamTrack_sender_2",
            "kind": "video",
            "mediaSourceId": "RTCVideoSource_2",
            "remoteSource": false,
            "timestamp": 1586417622080.464,
            "trackIdentifier": "034ef502-977d-47b5-b0dd-f8f2f9c3efd4",
            "type": "track"
        },
        {
            "id": "RTCMediaStream_YzrwqojxygQekopjqDgu02X6YXRhCKMxQ995",
            "streamIdentifier": "YzrwqojxygQekopjqDgu02X6YXRhCKMxQ995",
            "timestamp": 1586417622080.464,
            "trackIds": [
                "RTCMediaStreamTrack_sender_1",
                "RTCMediaStreamTrack_sender_2"
            ],
            "type": "stream"
        },
        {
            "bytesSent": 23244,
            "codecId": "RTCCodec_audio_u7Lulw_Outbound_109",
            "headerBytesSent": 185952,
            "id": "RTCOutboundRTPAudioStream_3503369952",
            "isRemote": false,
            "kind": "audio",
            "mediaSourceId": "RTCAudioSource_1",
            "mediaType": "audio",
            "packetsSent": 7748,
            "retransmittedBytesSent": 0,
            "retransmittedPacketsSent": 0,
            "ssrc": 3503369952,
            "timestamp": 1586417622080.464,
            "trackId": "RTCMediaStreamTrack_sender_1",
            "transportId": "RTCTransport_audio_u7Lulw_1",
            "type": "outbound-rtp"
        },
        {
            "bytesSent": 9413867,
            "codecId": "RTCCodec_video_8IGSWf_Outbound_120",
            "encoderImplementation": "libvpx",
            "firCount": 0,
            "framesEncoded": 4642,
            "headerBytesSent": 220876,
            "id": "RTCOutboundRTPVideoStream_1584733228",
            "isRemote": false,
            "keyFramesEncoded": 2,
            "kind": "video",
            "mediaSourceId": "RTCVideoSource_2",
            "mediaType": "video",
            "nackCount": 91,
            "packetsSent": 10442,
            "pliCount": 0,
            "qpSum": 578791,
            "qualityLimitationReason": "none",
            "qualityLimitationResolutionChanges": 0,
            "retransmittedBytesSent": 0,
            "retransmittedPacketsSent": 0,
            "ssrc": 1584733228,
            "timestamp": 1586417622080.464,
            "totalEncodeTime": 12.09,
            "totalEncodedBytesTarget": 9513352,
            "totalPacketSendDelay": 289.948,
            "trackId": "RTCMediaStreamTrack_sender_2",
            "transportId": "RTCTransport_audio_u7Lulw_1",
            "type": "outbound-rtp"
        },
        {
            "dataChannelsClosed": 0,
            "dataChannelsOpened": 0,
            "id": "RTCPeerConnection",
            "timestamp": 1586417622080.464,
            "type": "peer-connection"
        },
        {
            "codecId": "RTCCodec_audio_u7Lulw_Outbound_109",
            "id": "RTCRemoteInboundRtpAudioStream_3503369952",
            "jitter": 0.002,
            "kind": "audio",
            "localId": "RTCOutboundRTPAudioStream_3503369952",
            "packetsLost": 79,
            "roundTripTime": 0.001,
            "ssrc": 3503369952,
            "timestamp": 1586417621929.611,
            "transportId": "RTCTransport_audio_u7Lulw_1",
            "type": "remote-inbound-rtp"
        },
        {
            "codecId": "RTCCodec_video_8IGSWf_Outbound_120",
            "id": "RTCRemoteInboundRtpVideoStream_1584733228",
            "jitter": 0.005655555555555555,
            "kind": "video",
            "localId": "RTCOutboundRTPVideoStream_1584733228",
            "packetsLost": 0,
            "roundTripTime": 0.001,
            "ssrc": 1584733228,
            "timestamp": 1586417621929.561,
            "transportId": "RTCTransport_audio_u7Lulw_1",
            "type": "remote-inbound-rtp"
        },
        {
            "bytesReceived": 39588,
            "bytesSent": 10044330,
            "dtlsCipher": "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
            "dtlsState": "connected",
            "id": "RTCTransport_audio_u7Lulw_1",
            "localCertificateId": "RTCCertificate_1B:FD:64:BF:B3:9F:14:1D:B4:78:A7:DD:F6:62:8D:9E:D7:48:C8:56:D6:1B:6D:04:4D:CA:5D:DB:6A:B3:89:C3",
            "remoteCertificateId": "RTCCertificate_FA:66:5F:F0:4B:10:F3:3C:71:26:A2:33:FF:C1:1B:D0:9E:C5:71:11:68:F3:41:82:84:11:8F:5D:D6:54:86:AE",
            "selectedCandidatePairChanges": 1,
            "selectedCandidatePairId": "RTCIceCandidatePair_kJFGYHCn_K+hhYOVG",
            "srtpCipher": "AES_CM_128_HMAC_SHA1_80",
            "timestamp": 1586417622080.464,
            "tlsVersion": "FEFD",
            "type": "transport"
        },
        {
            "framesPerSecond": 30,
            "height": 480,
            "id": "RTCVideoSource_2",
            "kind": "video",
            "timestamp": 1586417622080.464,
            "trackIdentifier": "034ef502-977d-47b5-b0dd-f8f2f9c3efd4",
            "type": "media-source",
            "width": 640
        }
    ],
    "timestamp": "2020-04-09T07:33:42.081Z"
}

その他の API

指定した接続のビットレートを動的に変更する

警告

この API は実験的機能のため、正式版では仕様が変更される可能性があります

サービス

Sora

バージョン

20190327

オペレーション

ChangeUpstreamVideoBitRate

x-sora-target

Sora_20190327.ChangeUpstreamVideoBitRate

この API は片方向とマルチストリームでのみ利用できます。スポットライトやスポットライトレガシーには対応していません。

主に rolesendonly配信ビットレート を動的に変更し固定するの事を目的としている API です。

警告

マルチストリームの sendrecv でも利用可能ですが、この API を利用してビットレートを変更した場合、ビットレートシェアリングが無効になり、配信ビットレートが固定されます。

キー

channel_id

string

connection_id

string

bit_rate

integer (1 - 30000)

$ http POST 127.0.0.1:3000/ x-sora-target:Sora_20190327.ChangeUpstreamVideoBitRate \
    channel_id=sora \
    connection_id=HMRVPQEXJX03D3B3WE778SJGRC \
    bit_rate:=300 \
    -vvv
POST / HTTP/1.1
Accept: application/json, */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 96
Content-Type: application/json
Host: 127.0.0.1:3000
User-Agent: HTTPie/1.0.2
x-sora-target: Sora_20190327.ChangeUpstreamVideoBitRate

{
    "bit_rate": 300,
    "channel_id": "sora",
    "connection_id": "HMRVPQEXJX03D3B3WE778SJGRC"
}

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: 91
content-type: application/json
date: Wed, 27 Mar 2020 08:38:03 GMT
server: Cowboy

{
    "bit_rate": 300,
    "channel_id": "sora",
    "connection_id": "HMRVPQEXJX03D3B3WE778SJGRC"
}
© Copyright 2021, Shiguredo Inc Created using Sphinx 4.2.0