Client Event Notification (HWLLSClientEvent)
This section describes the HWLLSClientEvent APIs of the LLL web SDK.
API |
Description |
---|---|
Media statistics event. |
|
Network quality report event. |
|
Video stream interruption event. |
|
Audio stream interruption event. |
|
Video streaming resumption event. |
|
Audio streaming resumption event. |
|
Audio playback start event. |
|
Video playback start event. |
|
Video playback pause event. |
|
Full-screen view event. |
|
Playback downgrade event. |
|
Client error event. |
Registration listening must be canceled when the service ends. Otherwise, memory leakage may occur when there are a certain number of registration listening events.
media-statistic
[Event Description]
Media statistics event. This event is used together with the streamStatistic method.
[Callback Parameters]
StatisticInfo: media statistics. The value type is StatisticInfo.
StatisticInfo is defined as follows: {
- video: {
frameRate: video frame rate. The type is number.
width: video width. The type is number.
height: video height. The type is number.
jitter: jitter. The type is number.
bitRate: bitrate (in kbit/s). The type is number.
bytesReceived: number of received bytes. The type is number.
packetsReceived: number of received packets. The type is number.
packetsLost: number of lost packets. The type is number.
}
- audio: {
jitter: jitter. The type is number.
bitRate: bitrate (in kbit/s). The type is number.
bytesReceived: number of received bytes. The type is number.
packetsReceived: number of received packets. The type is number.
packetsLost: number of lost packets. The type is number.
}
}
network-quality
[Event Description]
Network quality report event.
[Callback Parameters]
NetworkQualityTypes: network quality details. The type is NetworkQualityTypes.
The enumerated values of NetworkQualityTypes are as follows:
- NETWORK_QUALITY_UNKNOW = 0: The network quality is unknown.
- NETWORK_QUALITY_GREAT = 1: The network quality is excellent.
- NETWORK_QUALITY_GOOD = 2: User experience is almost the same as that of value 1, but the bitrate may be slightly lower.
- NETWORK_QUALITY_DEFECTS = 3: User experience is defective but the watching is not affected.
- NETWORK_QUALITY_WEAK = 4: The network quality is poor and the video is not smooth.
- NETWORK_QUALITY_BAD = 5: The network quality is so poor that user experience is severely affected.
- NETWORK_QUALITY_DISCONNECT = 6: The network quality is poor and even disconnection occurs. The video cannot be watched.
video-recovery
[Event Description]
Video streaming (non-EOF) resumption event.
[Callback Parameters]
None
audio-recovery
[Event Description]
Audio streaming (non-EOF) resumption event.
[Callback Parameters]
None
video-stuck
[Event Description]
Video playback pause event.
[Callback Parameters]
Boolean value. True indicates paused, and False indicates not paused.
fullscreen-status-changed
[Event Description]
Full-screen view event.
[Callback Parameters]
- isFullScreen: indicates whether to enable full-screen display
- isPause: indicates whether to stop playback
Indicates the downgrade information. The value is a string.
- webrtc: LLL playback
- hls: HLS playback
- flv: FLV playback
Error
[Event Description]
This event is triggered when an unrecoverable client error occurs.
[Callback Parameters]
errorInfo: (mandatory) error information. The type is ErrorInfo.
ErrorInfo is defined as: {
errorCode: (mandatory) error code. The type is string.
errorMsg: (mandatory) error description. The type is string.
}
If the network firewall is restricted (UDP port restriction) or playback fails on LLL for multiple times, you can downgrade the playback based on the specified error code (HWLLS_MEDIA_NETWORK_ERROR or HWLLS_PLAY_WEBRTC_RETRY_FAILED). For details, see SDK Usage.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot