Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/sfu/stats HTTP/1.1
Host: localhost:9091
Content-Type: application/json
Content-Length: 20

{
     "roomName":"ROOM1"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json
Content-Length: 1154

{
  "participants": [
    {
      "nickName": "User1",
      "outgoingTracks": [
        {
          "id": "9de9107c-ce5f-4d6b-b7d6-ea233d691d09",
          "codec": "opus",
          "bitrate": 0,
          "sampleRate": 48000,
          "channels": 2,
          "alive": true,
          "type": "AUDIO"
        },
        {
          "id": "237dcef9-c66d-4c72-bd43-0c91aaea3b7e",
          "composite": true,
          "tracks": {
            "h send": {
              "id": "237dcef9-c66d-4c72-bd43-0c91aaea3b7e",
              "codec": "H264",
              "width": 1280,
              "height": 720,
              "fps": 30,
              "bitrate": 157976,
              "alive": true,
              "type": "VIDEO"
            },
            "m send": {
              "id": "237dcef9-c66d-4c72-bd43-0c91aaea3b7e",
              "codec": "H264",
              "width": 640,
              "height": 360,
              "fps": 30,
              "bitrate": 263952,
              "alive": true,
              "type": "VIDEO"
            }
          }
        }
      ],
      "incomingTracks": {
        "3c2dcd1c-7acd-4b90-8871-331be80cade0": "h send"
      }
    },
    {
      "nickName": "User2",
      "outgoingTracks": [
        {
          "id": "3c2dcd1c-7acd-4b90-8871-331be80cade0",
          "composite": true,
          "tracks": {
            "h send": {
              "id": "3c2dcd1c-7acd-4b90-8871-331be80cade0",
              "codec": "H264",
              "width": 1280,
              "height": 720,
              "fps": 30,
              "bitrate": 238688,
              "alive": true,
              "type": "VIDEO"
            },
            "m send": {
              "id": "3c2dcd1c-7acd-4b90-8871-331be80cade0",
              "codec": "H264",
              "width": 640,
              "height": 360,
              "fps": 30,
              "bitrate": 265368,
              "alive": true,
              "type": "VIDEO"
            }
          }
        }
      ],
      "incomingTracks": {
        "9de9107c-ce5f-4d6b-b7d6-ea233d691d09": null,
        "237dcef9-c66d-4c72-bd43-0c91aaea3b7e": "h send"
      }
    }
  ]
}

/mpegts/startup

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/mpegts/startup HTTP/1.1
Host: localhost:8081
Content-Type: application/json
Content-Length: 26

{
  "localStreamName":"test"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json
Content-Length: 230

{
  "localMediaSessionId": "32ec1a8e-7df4-4484-9a95-e7eddc45c508",
  "localStreamName": "test",
  "uri": "udp://192.168.1.39:31006",
  "status": "CONNECTED",
  "hasAudio": true,
  "hasVideo": true,
  "record": false,
  "timeout": 90000,
  "maxTimestampDiff": 90000
}

/mpegts/find

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/mpegts/find_all HTTP/1.1
Host: localhost:8081
Content-Type: application/json
Content-Length: 61

{
 "localStreamName":"test",
 "uri": "udp://192.168.1.39:31006"
} 
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json
Content-Length: 238

[{
  "localMediaSessionId": "32ec1a8e-7df4-4484-9a95-e7eddc45c508",
  "localStreamName": "test",
  "uri": "udp://192.168.1.39:31006",
  "status": "CONNECTED",
  "hasAudio": true,
  "hasVideo": true,
  "record": false,
  "timeout": 90000,
  "maxTimestampDiff": 90000
}]

/mpegts/find_all

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/mpegts/find_all HTTP/1.1
Host: localhost:8081
Content-Type: application/json
Content-Length: 0
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json
Content-Length: 238

[{
  "localMediaSessionId": "32ec1a8e-7df4-4484-9a95-e7eddc45c508",
  "localStreamName": "test",
  "uri": "udp://192.168.1.39:31006",
  "status": "CONNECTED",
  "hasAudio": true,
  "hasVideo": true,
  "record": false,
  "timeout": 90000,
  "maxTimestampDiff": 90000
}]

/mpegts/terminate

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/mpegts/startup HTTP/1.1
Host: localhost:8081
Content-Type: application/json
Content-Length: 26

{
  "localStreamName":"test"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json