O SDK do Alibaba Real-Time Communication (ARTC) ingere e faz pull automaticamente de streams de áudio e vídeo quando um usuário entra em um canal, troca de função ou sai dele. Esse recurso vem ativado por padrão. Este tópico explica o funcionamento do recurso e fornece exemplos de código para desativá-lo.
Funcionamento
Nota
Em cenários apenas de áudio, o sistema ingere e recebe via pull somente streams de áudio.
Em cenários com áudio e vídeo, o sistema ingere e faz pull de todos os streams de áudio e vídeo configurados.

Exemplos de código
API para desativar a ingestão e o pull automático de streams
Desative a ingestão e o pull automático de streams separadamente para controlar cada comportamento de forma independente.
Desativar a ingestão automática de streams de áudio e vídeo
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);
Desativar o pull automático de streams de áudio e vídeo
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);