Skip to main content

You are viewing Agora Docs forBetaproducts and features. Switch to Docs

When pushing streams to the CDN, what should I do when a disconnection happens?

This article only applies to the Agora Web SDK 3.x and earlier versions.

Pushing streams to the CDN refers to the process where a host publishes multiple media streams to the CDN (Content Delivery Network).

During pushing streams, the SDK connects to the dedicated Agora server for pushing streams. When the connection is interrupted, the SDK tries to reconnect to the server to continue pushing streams. If it fails to reconnect, the SDK triggers a callback to report a disconnection.

Based on live transcoding setting, the SDK connects to different servers for pushing streams and triggers different callbacks after disconnection.

enableTranscodingCallback triggered when a disconnection happens
trueClient.on("mix-streaming-disconnected")
falseClient.on("raw-streaming-disconnected")

When either of the previously-mentioned events occurs, call stopLiveStreaming to stop pushing all streams, and then startLiveStreaming to restart the process.

vundefined