Dev Center
All Community
When injecting online streams to the CDN, what should I do when a disconnection happens?
Type: Integration issues    Platform: Web   Last Updated: 2020/11/12 00:34:55

Injecting an online media stream refers to the process where a host injects an external audio or video stream to an ongoing live-broadcast channel.

During the process of injecting online media streams, the SDK connects to the Agora server for pulling external audio or video streams. When the connection is interrupted, the SDK tries to reconnect to the server. If it fails to reconnect, the SDK triggers the Client.on("inject-streaming-disconnected") callback to report a disconnection.

When this event occurs, call removeInjectStreamUrl to stop pulling the stream, and then addInjectStreamUrl to restart the process.