onError(code: number, msg: string, extraInfo: Object): void;
code
: error code. For details, please see Error codes for publishing.msg
: error messageextraInfo
: extra information. This parameter is not used currently.onWarning(code: number, msg: string, extraInfo: Object): void;
code
: error code. For details, please see Error codes for publishing.msg
: error messageextraInfo
: extra information. This parameter is not used currently.onCaptureFirstAudioFrame(): void;
onCaptureFirstVideoFrame(): void;
onPushStatusUpdate(status: number, msg: string, extraInfo: Object): void;
status
: connection status code. For details, please see Status codes for publishing.msg
: connection status messageextraInfo
: extra information. This parameter is not used currently.onStatisticsUpdate(statistics: Object): void;
Enumerated Value | Code | Description |
TXLIVE_ERROR_WEBRTC_FAILED | -1 | Failed to call a WebRTC API. |
TXLIVE_ERROR_REQUEST_FAILED | -2 | Error when requesting the server to publish streams. |
TXLIVE_WARNING_CAMERA_START_FAILED | -1001 | Failed to turn the camera on. |
TXLIVE_WARNING_MICROPHONE_START_FAILED | -1002 | Failed to turn the mic on. |
TXLIVE_WARNING_SCREEN_CAPTURE_START_FAILED | -1003 | Failed to record the screen. |
TXLIVE_WARNING_MEDIA_FILE_START_FAILED | -1004 | Failed to open a local media file. |
TXLIVE_WARNING_CAMERA_INTERRUPTED | -1005 | Capturing from the camera was interrupted (because the device was disconnected or the user denied the access). |
TXLIVE_WARNING_MICROPHONE_INTERRUPTED | -1006 | Capturing from the mic was interrupted (because the device was disconnected or the user denied the access). |
TXLIVE_WARNING_SCREEN_CAPTURE_INTERRUPTED | -1007 | Screen recording was interrupted (because the user clicked Chrome’s built-in stop-sharing button). |
Enumerated Value | Code | Description |
TXLIVE_PUSH_STATUS_DISCONNECTED | 0 | Disconnected from the server. |
TXLIVE_PUSH_STATUS_CONNECTING | 1 | Connecting to the server. |
TXLIVE_PUSH_STATUS_CONNECT_SUCCESS | 2 | Connected to the server. |
TXLIVE_PUSH_STATUS_RECONNECTING | 3 | Reconnecting to the server. |
video
Parameter | Description |
bitrate | Video bitrate (bit/s) |
framesPerSecond | Video frame rate |
frameWidth | Video width, invalid for Firefox |
frameHeight | Video height, invalid for Firefox |
framesEncoded | Number of encoded frames |
framesSent | Number of published frames, invalid for Firefox |
packetsSent | Number of data packets sent |
nackCount | Number of negative acknowledgements (NACK) |
firCount | Number of Full Intra Requests (FIR) |
pliCount | Number of Picture Loss Indications (PLI) |
frameEncodeAvgTime | Average encoding time (ms), invalid for Safari and Firefox |
packetSendDelay | Average time (ms) data packets are cached locally before being sent, invalid for Firefox |
audio
Parameter | Description |
bitrate | Audio bitrate (bit/s) |
packetsSent | Number of data packets sent |
Was this page helpful?