> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Chamadas de API com reconhecimento de nuvem

> Chamadas de API com reconhecimento de nuvem

Use este tópico para detectar se o seu título com reconhecimento de nuvem é capaz de fazer streaming, para que você possa [otimizar seu jogo](/pt-BR/build/core-features/common/game-streaming/game-streaming-optimizing-your-game) para o XBOX Game Streaming.

## Configurar seu jogo para streaming

Durante a inicialização do jogo, verifique se você configurou o componente de game streaming usando `XGameStreamingInitialize`, conforme mostrado no código a seguir.

```C++ theme={null}

// Initialize the game streaming component
XGameStreamingInitialize();

```

Para detectar se há clientes de streaming ativos conectados no momento, use `XGameStreamingIsStreaming`, conforme mostrado no código a seguir.

```C++ theme={null}
 if (XGameStreamingIsStreaming())
 {
     // The game is currently streaming to at least one device
     // Enable any customizations that might be useful when running from the cloud
 }
```

## Gerenciar o estado da conexão

Se houver clientes de streaming ativos, seu jogo terá uma visão pontual desses clientes ao usar `XGameStreamingIsStreaming`. Para receber notificações quando um cliente de streaming se conectar ou se desconectar do seu jogo, use [XGameStreamingRegisterConnectionStateChanged](/pt-BR/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged).

## Documentação de referência da API

* [XGameStreaming (conteúdo da API)](/pt-BR/reference/system/xgamestreaming/xgamestreaming_members)
  * Funções
    * [XGameStreamingRegisterConnectionStateChanged](/pt-BR/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged)

## Consulte também

[XGameStreaming (conteúdo da API)](/pt-BR/reference/system/xgamestreaming/xgamestreaming_members#connection-state)
[Otimizando seu jogo](/pt-BR/build/core-features/common/game-streaming/game-streaming-optimizing-your-game)


## Related topics

- [Casos de teste com mais falhas](/pt-BR/publishing/certification/xr-top-failing.md)
- [XR-074 Perda de conectividade com os serviços XBOX e de parceiros](/pt-BR/publishing/certification/xr/xr-074.md)
- [Documentação de desenvolvimento de jogos XBOX](/pt-BR/index.md)
- [Visão geral de Godot e engines da comunidade](/pt-BR/paths/community-engines/overview.md)
- [Requisitos XBOX testados na certificação para jogos de console XBOX](/pt-BR/publishing/certification/console-cert-tested-requirements.md)
