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

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

Type: Integration issues    Platform: Web   Last Updated: 2022/08/21 22:55:59
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.