Reference of ProPTT2 SDK V5
Description of ProPTT2 SDK version 5.x~
Please note that ProPTT2 SDK is based on UTF8.
Constant
Media Profile ID
| id | name | description |
|---|---|---|
| 65552 | OPUS8_ONLY_VBR | Opus 8000Hz/16Bit/Mono, VBR |
| 65553 | OPUS8_ONLY | Opus 8000Hz/16Bit/Mono, 8kbps |
| 65554 | CODEC2_ONLY | Codec2 8000Hz/16Bit/Mono, 2.4kbps |
| 131089 | OPUS16_ONLY | Opus 16000Hz/16Bit/Mono 16kbps |
| 131090 | OPUS16_32ONLY | Opus 16000Hz/16Bit/Mono. 32kbps |
| 8224 | H.264_ONLY | |
| 286330929 | OPUS8_MJPEG | Opus 8000Hz/16Bit/Mono JPEG 160*120/5fps, Low |
| 287379505 | OPUS8_MJPEG | Opus 8000Hz/16Bit/Mono JPEG 160*120/5fps, Mid |
| 288428081 | OPUS8_MJPEG | Opus 8000Hz/16Bit/Mono JPEG 160*120/5fps, High |
| 286396465 | OPUS16_MJPEG | Opus 16000Hz/16Bit/Mono JPEG 160*120/5fps, Low |
| 287445041 | OPUS16_MJPEG | Opus 16000Hz/16Bit/Mono JPEG 160*120/5fps, Mid |
| 288493617 | OPUS16_MJPEG | Opus 16000Hz/16Bit/Mono JPEG 160*120/5fps, High |
PTTClient
Main Controller
> View detailPTTChannel
Audio/Video PTT channel object
> View detailGroup
Group of buddies
> View detailVideoChannel
Video sharing channel object
> View detailFileChannel
File sharing channel object
> View detailError Code
Common
| Error Code | Error Name | Description |
|---|---|---|
| 30000 | ERROR_PERMISSION_NOT_GRANT | Need permission |
PTTClient
| Error Code | Error Name | Description |
|---|---|---|
| 1000 | ERROR_CREATE_VIDEOCHANNEL | Device can not support announcing video at openVideoAnnouncerChannel. |
PTTChannel
| Error Code | Error Name | Description |
|---|---|---|
| 10000 | ERROR_MIC_CAPTURE | Can't use mic device |
VideoChannel
| Error Code | Error Name | Description |
|---|---|---|
| 20000 | ERROR_CAMERA_PREVIEW | At startPreview, camera resolution is not supported. |
| 21000 | ERROR_VIDEO_CHANNEL_NETWORK_DISCONNECTED | Video receiving timeout. |
| 21001 | ERROR_VIDEO_CHANNEL_FAIL_TO_CONNECT | Video rconnection is failure. |
| 21002 | ERROR_VIDEO_CHANNEL_FAIL_TO_CAPTURE_VIDEO | Video capture is failure. Device camera maybe not supported |
FileChannel
| Error Code | Error Name | Description |
|---|---|---|
| 21000 | ERROR_VIDEO_CHANNEL_NETWORK_DISCONNECTED | Video receiving timeout. |
| 21001 | ERROR_VIDEO_CHANNEL_FAIL_TO_CONNECT | Video rconnection is failure. |
Result Code
| Result Code | Result Message | Description |
|---|---|---|
| 200 | OK | |
| 400 | BadRequest Connect: Input parameter | |
| 401 | Unauthorized Connect: License | |
| 402 | PaymentRequired | |
| 403 | Forbidden | |
| 405 | MethodNotAllowed | |
| 412 | PreconditionFailed Connect: check passwordToken | |
| 481 | ChannelNotFound | |
| 500 | InternalServerError | |
| 503 | ServiceUnavailable. Service has some issues. |
Push Message CustomFields
Required to awake User
| field | type | description | default | |
|---|---|---|---|---|
| Command | int | Message ID | 31 | M |
| RequesterID | string | Requester's ID | M | |
| RequesterName | string | Requester's Name, URLEncode | M |
Required to join Channel
| field | type | description | default | |
|---|---|---|---|---|
| Command | int | Message ID | 30 | M |
| ChannelID | int | Channel's ID | M | |
| RequesterID | string | Requester's ID | M | |
| RequesterName | string | Requester's Name, URLEncode | M |
Required to invite User into Channel
| field | type | description | default | |
|---|---|---|---|---|
| Command | int | Message ID | 81 | M |
| ChannelID | int | Channel's ID | M | |
| ChannelName | string | Channel's Name, URLEncode | M | |
| ChannelType | string | 'S'ystem,'F'ree,'P'rivate,'C'ompany,'G'roup,'1':1 | M | |
| RequesterID | string | Requester's ID | M | |
| RequesterName | string | Requester's Name, URLEncode | M |
Required to subscribe to Channel
| field | type | description | default | |
|---|---|---|---|---|
| Command | int | Message ID | 69 | M |
| ChannelID | int | Channel's ID | M | |
| RequesterID | string | Requester's ID | M | |
| RequesterName | string | Requester's Name, URLEncode | M |
Required to accept Buddy
| field | type | description | default | |
|---|---|---|---|---|
| Command | int | Message ID | 53 | M |
| RequesterID | string | Requester's ID | M | |
| RequesterName | string | Requester's Name | M |
