Documentation
All
Agora.io Community

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

Type: Integration issues    Platform: Web   Last Updated: 2021/02/26 00:26:54
Agora will soon stop the service for injecting online media streams on the client. If you have not implemented this service, Agora recommends that you do not use it.

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.