Description
Remote host sends the audio data through HTTP session to the device to play out.
In two-way audio enabled device, it could accept the audio data from the remote host and play the audio data through its audio out interface. There is only one host could play the audio on the device at any time. The audio token in the device controls is used for this criterion.That means the host have to get the audio token first.
If audio token is not available, the error message, 503 Service Unavailable, will be returned.
Currently, the device just only accepts the PCM with 8KHz sample rate, 16bits/sample format.
In the multiple channel video server, the HTTP port of this command should be the HTTP port of the channel not the router.
The POST method is used in this URL command to send to the device. If there is no error code was replied from the device, the host could upload its audio data to the device. The multipart/x-mixed-replace in the content type is used during the upload. The length of every multipart boundary is 1024 bytes. Here is the network trace from host to the device as an example.
POST /cgi-bin/cmd/encoder?SEND_
AUDIO HTTP/1.1
Content-Type: multipart/x-mixed-replace;
boundary=-
---------A
outBoundar
y
Connection: Keep-Alive
Cache-Control: no-cache
Authorization: Basic YWRtaW46MTIzNDU2
----------AoutBoundary
Content-Type: audio/pcm
Content-Length: 1024
....Audio raw data....
----------AoutBoundary
Content-Type: audio/pcm
Content-Length: 1024
....Audio raw data....
....
Input Augument
None
Attribute
None
Return of Message
None if everything is OK,
401 Unauthorized if fails of authentication,
503 Service Unavailable if it is not two-way audio device or audio token is not available,
404 Not Found if there is something wrong in the POST header.
Applicability
WPL Platfrom: 1CH encoder
EPL Platfrom: All Encoders
PlatfromT: All Encoders
Multi-Channel Encoder: All Video Servers
Status
Valid
See Also
None
Example
http://ip:port/cgi-bin/encoder?USER=admin&PWD=123456&SEND_AUDIO or
http://ip:port/cgi-bin/cmd/encoder?SEND_AUDIO