Le SDK Alibaba Real-Time Communication (ARTC) ingère et récupère automatiquement les flux audio et vidéo lorsqu'un utilisateur rejoint un canal, change de rôle ou quitte un canal. Cette fonctionnalité est activée par défaut. Cette rubrique décrit son fonctionnement et fournit des exemples de code pour la désactiver.
Fonctionnement
Remarque
Dans les scénarios audio uniquement, seuls les flux audio sont ingérés et récupérés.
Dans les scénarios audio et vidéo, tous les flux audio et vidéo configurés sont ingérés et récupérés.

Exemple de code
API pour désactiver l'ingestion et la récupération automatiques des flux
Désactivez séparément l'ingestion et la récupération automatiques des flux afin de contrôler chaque comportement de manière indépendante.
Désactiver l'ingestion automatique des flux audio et vidéo
Android
/* If you set the parameter to false, video streams are not ingested after a user joins the channel. Your app must call this API to ingest video streams. */
/* If you set the parameter to true, video streams are immediately ingested after a user joins the channel. The default value is true. */
mAliRtcEngine.publishLocalVideoStream(false);
/* If you set the parameter to false, audio streams are not ingested after a user joins the channel. Your app must call this API to ingest audio streams. */
/* If you set the parameter to true, audio streams are immediately ingested after a user joins the channel. The default value is true. */
mAliRtcEngine.publishLocalAudioStream(false);
iOS
/* If you set the parameter to NO, video streams are not ingested after a user joins the channel. Your app must call this API to ingest video streams. */
/* If you set the parameter to YES, video streams are immediately ingested after a user joins the channel. The default value is YES. */
[self.engine publishLocalVideoStream:NO];
/* If you set the parameter to NO, audio streams are not ingested after a user joins the channel. Your app must call this API to ingest audio streams. */
/* If you set the parameter to YES, audio streams are immediately ingested after a user joins the channel. The default value is YES. */
[self.engine publishLocalAudioStream:NO];
Windows
/* If you set the parameter to false, video streams are not ingested after a user joins the channel. Your app must call this API to ingest video streams. */
/* If you set the parameter to true, video streams are immediately ingested after a user joins the channel. The default value is true. */
mAliRtcEngine->PublishLocalVideoStream(false);
/* If you set the parameter to false, audio streams are not ingested after a user joins the channel. Your app must call this API to ingest audio streams. */
/* If you set the parameter to true, audio streams are immediately ingested after a user joins the channel. The default value is true. */
mAliRtcEngine->PublishLocalAudioStream(false);
Désactiver la récupération automatique des flux audio et vidéo
Android
/* If you set the parameter to false, video streams are not subscribed to after a user joins the channel. Your app must call the subscribeRemoteMediaStream or subscribeRemoteVideoStream method to subscribe to video streams. */
/* If you set the parameter to true, video streams are immediately subscribed to after a user joins the channel. The default value is true. */
mAliRtcEngine.setDefaultSubscribeAllRemoteVideoStreams(false);
/* If you set the parameter to false, audio streams are not subscribed to after a user joins the channel. Your app must call the subscribeRemoteMediaStream or subscribeRemoteAudioStream method to subscribe to audio streams. */
/* If you set the parameter to true, audio streams are immediately subscribed to after a user joins the channel. The default value is true. */
mAliRtcEngine.setDefaultSubscribeAllRemoteAudioStreams(false);
iOS
/* If you set the parameter to NO, video streams are not subscribed to after a user joins the channel. Your app must call the subscribeRemoteMediaStream or subscribeRemoteVideoStream method to subscribe to video streams. */
/* If you set the parameter to YES, video streams are immediately subscribed to after a user joins the channel. The default value is YES. */
[self.engine setDefaultSubscribeAllRemoteVideoStreams:NO];
/* If you set the parameter to NO, audio streams are not subscribed to after a user joins the channel. Your app must call the subscribeRemoteMediaStream or subscribeRemoteAudioStream method to subscribe to audio streams. */
/* If you set the parameter to YES, audio streams are immediately subscribed to after a user joins the channel. The default value is YES. */
[self.engine setDefaultSubscribeAllRemoteAudioStreams:NO];
Windows
/* If you set the parameter to false, video streams are not subscribed to after a user joins the channel. Your app must call the SubscribeRemoteMediaStream or SubscribeRemoteVideoStream method to subscribe to video streams. */
/* If you set the parameter to true, video streams are immediately subscribed to after a user joins the channel. The default value is true. */
mAliRtcEngine.SetDefaultSubscribeAllRemoteVideoStreams(false);
/* If you set the parameter to false, audio streams are not subscribed to after a user joins the channel. Your app must call the SubscribeRemoteMediaStream or SubscribeRemoteAudioStream method to subscribe to audio streams. */
/* If you set the parameter to true, audio streams are immediately subscribed to after a user joins the channel. The default value is true. */
mAliRtcEngine.SetDefaultSubscribeAllRemoteAudioStreams(false);