通知
本站点除 Legacy 产品与方案外,已迁移至 声网新文档中心 ,当前页面不再维护
Documentation
All
Console 官网 Community Technical support

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

Type: Integration issues    Platform: Web   Last Updated: 2022/09/14 23:43:55
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.

enableTranscoding Callback triggered when a disconnection happens
true Client.on("mix-streaming-disconnected")
false Client.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.