start-test-server
Use the interface to start a stream test. Only one stream can be tested each time.
Call the stop-test-server to cancel the stream test manually if needed. The test will stop automatically at 20s.
HTTP Request
GET http://ip/usapi?method=start-test-server&type=xxx&url=xxx&key=xxx&...
| Parameter | Description |
|---|---|
| method | start-test-server |
| type | Indicates server type. 0: RTMP 1: Twitch 2: YouTube 3: Facebook |
| url | Indicates server address. |
| key | Indicates the stream key. |
| is-auth | Indicates whether an authentication is required. 0 indicates that an authentication is not required 1 indicates that an authentication is required, and username and password are required. |
| user | Indicates username. |
| passwd | Indicates password. |
| token | Indicates token. |
| net-mode | Indicates the prime network for streaming. 0: Mobile Broadband first 1: Ethernet first 2: Wi-Fi first |
Response Body
{
"result": 0
}
| Item | Description |
|---|---|
| result | Returned status. 0 indicates that a stream test is started. 1 indicates repeat request. -9 indicates that system is busy. Refer to API Status Codes to find specific description for other values. |
Test Status
Obtain living-test by calling get-status.
"living-test": {
"result": 27,
"upload-bps": 0,
"percent": 0,
"net": 0,
"client-id": ""
}
| Item | Description |
|---|---|
| result | Returned status. 27 indicates that the device is in initial status. 5 indicates that request is canceled. 2 indicates that a stream test is in progress. 0 indicates that the request was accepted successfully. Refer to API Status Codes to find specific description for other values. |
| percent | Indicates the percentage of stream test. |
| upload-bps | Indicates the upload speed. |
| net | Indicates the network type. |
| client-id | Reserved |
Call the clear-test-server to set the device to the initial status (retInit=27) after the test.