Polyv Help Center

Help Center

Key Information Callback During Live Streaming

Updated: 2026-11-13 11:05:03

Purpose

During live streaming, callbacks report the instructor's actions and network status (currently only instructors are supported; guest and other roles will be supported gradually in the future).

Details

After the API address is configured, when relevant channels under the account are live streaming, several operations performed by the instructor and the instructor's network status at that time will be submitted via POST to the user-defined callback API for notification.

Callback Parameter Description

Parameters included in the callback (requested via form-data parameters):

Parameter Name Type Description
logList string JSON format of an array of objects
timestamp number Current timestamp
sign string Signature verification. Prepend and append polyvlog, with the data's key and value in between; keys are sorted alphabetically from smallest to largest. After MD5 encoding, convert to uppercase. For example, if the parameters are {roomId:'200060', channelId:'005200060',user:{nick:'yang'}}, the signature is md5/('polyvlog'+'channelId'+'005200060'+'roomId'+'200060'+'user'+JSON.stringify({nick:'yang'})+'polyvlog').toLocaleUpperCase();'}

Notes

  • Callbacks aggregate data within 1 second and deliver it in a single callback
  • Both the old and new admin consoles are supported
  • Because callbacks are relatively frequent and may put pressure on the customer's server, communicate with the customer in advance
  • The API returns a JSON object containing a code field; 200 indicates success. If 200 is not returned, the callback will be retried 3 times; after more than 3 times, the log will be discarded

logList Parameter JSON Object Array Format

Parameter Name Type Description
EVENT string Operation event type, described below
sessionId string Session ID
roomId string Channel ID
userOrigin string Source of information; client indicates client, webClient indicates web-based streaming
timestamp number Timestamp when the data was generated

EVENT Types

Currently EVENT includes AV_DEVICE_INFO, PPT_OPERATION, and NETWORK_STATUS; the data format differs for each type.

AV_DEVICE_INFO
The data format of AV_DEVICE_INFO is:
Parameter Name Type Description
audio Object Audio information
video Object Video information
The audio parameter includes:
Parameter Name Type Description
switch boolean Master switch status of the audio stream
microphone Object One of the audio source types: microphone
speaker Object One of the audio source types: system sound. Only switch status is included
media Object One of the audio source types: media file audio. Only switch status is included
The audio.microphone parameter includes:
Parameter Name Type Description
deviceId string Unique device identifier
deviceName string A string describing the device (e.g., "microphone array").
switch boolean Whether the current audio track includes audio from this device
volume number Volume setting
The audio.speaker parameter includes:
Parameter Name Type Description
switch boolean Switch status
The audio.media parameter includes:
Parameter Name Type Description
switch boolean Switch status
The video parameter includes:
Parameter Name Type Description
switch boolean Master switch status of the video stream
camera Object One of the video capture types: camera
screen Object One of the video capture types: screen sharing
The video.camera parameter includes:
Parameter Name Type Description
switch Boolean Switch status
deviceList Array[Object] Camera device list.
The video.camera.deviceList parameter includes:
Parameter Name Type Description
deviceId string Unique device identifier
deviceName string A string describing the device (e.g., "external USB webcam").
The video.screen parameter includes:
Parameter Name Type Description
displaySurface string Indicates the type of screen sharing being captured; possible values: browser (a single browser tab), monitor (screen), window (application window)
switch boolean Switch status
PPT_OPERATION
The data format of PPT_OPERATION is:
Parameter Name Type Description
operation string Operation type: open (open PPT), switchpage (switch page), switchAnimation (switch animation)
fileId string Unique file identifier
fileName string File name
pageId number Page ID
step number Page transition step
NETWORK_STATUS
The data format of NETWORK_STATUS is:
Parameter Name Type Description
networkQuality number Network quality, divided into levels 0-6:
0: Network quality unknown;
1: Network quality excellent;
2: Network quality good;
3: Network quality fair;
4~5: Network quality poor, adjustment recommended promptly;
6: Currently disconnected.
networkDelay number Round-trip delay from the streaming end to the cloud, in ms.
The smaller the value, the better: if rtt < 50ms, it means low audio/video call latency; if rtt > 200ms, it means high audio/video call latency.
uplinkLossRate number Uplink packet loss rate, value range [0, 1] (optional; required if uplinkVideoLossRate and uplinkAudioLossRate are not returned)
uplinkVideoLossRate number Uplink video packet loss rate, value range [0, 1] (optional; required if uplinkLossRate is not returned)
uplinkAudioLossRate number Uplink audio packet loss rate, value range [0, 1] (optional; required if uplinkLossRate is not returned)
downlinkLossRate number Downlink packet loss rate, value range [0, 1] (optional; required if downlinkVideoLossRate and downlinkAudioLossRate are not returned)
downlinkVideoLossRate number Downlink video packet loss rate, value range [0, 1] (optional; required if downlinkLossRate is not returned)
downlinkAudioLossRate number Downlink audio packet loss rate, value range [0, 1] (optional; required if downlinkLossRate is not returned)
uplinkAudios Array[Object] Uplink audio stream information
uplinkAudios[index].volume number Audio stream volume, value range [0, 100]

How to Configure

Configure via the admin console:

Log in to your account - click [Settings] - under [Development Settings], click [Callbacks and APIs] - find [Key Information Callback URL During Live Streaming] and enter the callback address

Note: The submitted API address must start with http:// or https://

Admin Console Configuration Reference Image

Admin console configuration:

Key Information Callback URL During Live Streaming Configuration

联系客服,在线咨询
在线咨询