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

idnamedescription
65552OPUS8_ONLY_VBROpus 8000Hz/16Bit/Mono, VBR
65553OPUS8_ONLYOpus 8000Hz/16Bit/Mono, 8kbps
65554CODEC2_ONLYCodec2 8000Hz/16Bit/Mono, 2.4kbps
131089OPUS16_ONLYOpus 16000Hz/16Bit/Mono 16kbps
131090OPUS16_32ONLYOpus 16000Hz/16Bit/Mono. 32kbps
8224H.264_ONLY
286330929OPUS8_MJPEGOpus 8000Hz/16Bit/Mono
JPEG 160*120/5fps, Low
287379505OPUS8_MJPEGOpus 8000Hz/16Bit/Mono
JPEG 160*120/5fps, Mid
288428081OPUS8_MJPEGOpus 8000Hz/16Bit/Mono
JPEG 160*120/5fps, High
286396465OPUS16_MJPEGOpus 16000Hz/16Bit/Mono
JPEG 160*120/5fps, Low
287445041OPUS16_MJPEGOpus 16000Hz/16Bit/Mono
JPEG 160*120/5fps, Mid
288493617OPUS16_MJPEGOpus 16000Hz/16Bit/Mono
JPEG 160*120/5fps, High

PTTClient

Main Controller

> View detail

PTTChannel

Audio/Video PTT channel object

> View detail

Group

Group of buddies

> View detail

VideoChannel

Video sharing channel object

> View detail

FileChannel

File sharing channel object

> View detail

Error Code

Common

Error CodeError NameDescription
30000ERROR_PERMISSION_NOT_GRANTNeed permission

PTTClient

Error CodeError NameDescription
1000ERROR_CREATE_VIDEOCHANNELDevice can not support announcing video at openVideoAnnouncerChannel.

PTTChannel

Error CodeError NameDescription
10000ERROR_MIC_CAPTURECan't use mic device

VideoChannel

Error CodeError NameDescription
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 CodeError NameDescription
21000 ERROR_VIDEO_CHANNEL_NETWORK_DISCONNECTED Video receiving timeout.
21001 ERROR_VIDEO_CHANNEL_FAIL_TO_CONNECT Video rconnection is failure.

Result Code

Result CodeResult MessageDescription
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

fieldtypedescriptiondefault
CommandintMessage ID31M
RequesterIDstringRequester's IDM
RequesterNamestringRequester's Name, URLEncodeM

Required to join Channel

fieldtypedescriptiondefault
CommandintMessage ID30M
ChannelIDintChannel's ID M
RequesterIDstringRequester's IDM
RequesterNamestringRequester's Name, URLEncodeM

Required to invite User into Channel

fieldtypedescriptiondefault
CommandintMessage ID81M
ChannelIDintChannel's IDM
ChannelNamestringChannel's Name, URLEncode M
ChannelTypestring'S'ystem,'F'ree,'P'rivate,'C'ompany,'G'roup,'1':1M
RequesterIDstringRequester's IDM
RequesterNamestringRequester's Name, URLEncodeM

Required to subscribe to Channel

fieldtypedescriptiondefault
CommandintMessage ID69M
ChannelIDintChannel's IDM
RequesterIDstringRequester's IDM
RequesterNamestringRequester's Name, URLEncodeM

Required to accept Buddy

fieldtypedescriptiondefault
CommandintMessage ID53M
RequesterIDstringRequester's IDM
RequesterNamestringRequester's NameM