The event detail.
Audio's Average package loss.
Bandwidth, measured in bits per second (bps)
Bit rate, measured in bits per second (bps)
If encoding is true, the following metrics stand for the Send data statistics, otherwise, it stands for the Receive data statistics.
Audio's jitter.
Audio's maximum package loss.
Audio's round trip time.
Audio's sample rate.
Occurs when the connection is changed.
Occurs when the video statistics data is changed;
The event detail
Video's average package loss.
Bandwidth, measured in bits per second (bps)
Bit rate, measured in bits per second (bps)
If encoding is true, the following metrics stand for the Send data statistics, otherwise, it stands for the Receive data statistics.
Video's frame rate in frames per second (FPS).
Video's resolution height.
Video's jitter.
Video's maximum package loss.
Video's round trip time.
Video's sample rate.
Video's resolution width.
Occurs when streaming is ended.
liveVideo.addEventListener('ended', () => {
});
Occurs when streaming is playing.
liveVideo.addEventListener('playing', () => {
});
Occurs when resolution of the streaming changes.
liveVideo.addEventListener('resolution-change', (event) => {
const {
detail: { oldVal, newVal },
} = event;
console.log(`resulotion changes from ${oldVal}P to ${newVal}P`);
});
Occurs when the rewind capability of the stream changes.
liveVideo.addEventListener('rewind-config', (event) => {
const {
detail: isSupported,
} = event;
console.log(`Current streaming supports rewind:${isSupported}`);
});
Occurs when a new TS (Transport Stream) segment is updated, the detail indicates the maximum rewind duration available at that moment.
liveVideo.addEventListener('rewind-total-time', (event) => {
const {
detail: totalTime,
} = event;
console.log(`Current max rewind time: ${totalTime}`);
});
Occurs in rewind mode, when the time indicated by the currentTime attribute has been updated.
Occurs when streaming is blocking, it's better to show the loading.
liveVideo.addEventListener('waiting', () => {
});
Occurs when the SDK tried and failed to auto play audio.
This is usually because the streaming was played without any prior user interaction with the page.
In this callback, you need to manually set the muted
attribute of the live-video element to 'false'.
Occurs when the audio statistics data is changed;