...
- stream.publish() is invoked on the client side
- WCS queries the local web server at http://localhost:9091/publishStream
- WCS receives 200 OK response from the local server
- WCS sends the StreamStatusEvent event to the client, status = PUBLISHING
The final result is the PUBLISHING status displayed on the web page:
Invocation of the /publishStream method (step 2) looks as follows when the HTTP protocol is analyzed in Wireshark:
Request | Response |
---|
Code Block |
---|
| POST /EchoApp/publishStream HTTP/1.1
Accept: application/json, application/*+json
Content-Type: application/json;charset=UTF-8
User-Agent: Java/1.8.0_45
Host: localhost:9091
Connection: keep-alive
Content-Length: 3622
{
"nodeId":"H4gfHeULtX6ddGGUWwZxhUNyqZHUFH8j@192.168.1.59",
"appKey":"defaultApp",
"sessionId":"/192.168.1.38:52791/192.168.1.59:8443",
"mediaSessionId":"87c5ff20-fb59-11e6-812c-1b28ccb49323",
"name":"84cac22c",
"published":true,
"hasVideo":true,
"hasAudio":true,
"status":"PENDING",
"record":false,
"width":0,
"height":0,
"bitrate":0,
"quality":0,
"mediaProvider":"WebRTC"
} |
| Code Block |
---|
| HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Sat, 25 Feb 2017 05:51:11 GMT
{
"nodeId":"H4gfHeULtX6ddGGUWwZxhUNyqZHUFH8j@192.168.1.59",
"appKey":"defaultApp",
"sessionId":"/192.168.1.38:52791/192.168.1.59:8443",
"mediaSessionId":"87c5ff20-fb59-11e6-812c-1b28ccb49323",
"name":"84cac22c",
"published":true,
"hasVideo":true,
"hasAudio":true,
"status":"PENDING",
"record":false,
"width":0,
"height":0,
"bitrate":0,
"quality":0,
"mediaProvider":"WebRTC"
} |
|