> ## 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.

# XGameStreamingIsStreaming

> XGameStreamingIsStreaming

# XGameStreamingIsStreaming

确定游戏当前是否正在流式播放。

## 语法

```cpp theme={null}
bool XGameStreamingIsStreaming();
```

### 返回值

类型：bool

如果游戏在至少连接了一个流式处理客户端设备的 XBOX 上运行，则 `XGameStreamingIsStreaming` 返回 true。

## 备注

`XGameStreamingIsStreaming` 不区分主机是通过远程游戏还是通过 XBOX 游戏流式处理进行流式传输。

若要收到有关单个流式处理客户端设备连接和/或断开连接的通知，请考虑通过 [XGameStreamingRegisterConnectionStateChanged](/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged) 注册回调。

## 示例

```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
 }
```

## 要求

**标头：** xgamestreaming.h

**库：** xgameruntime.lib

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[XGameStreamingConnectionState](/reference/system/xgamestreaming/enums/xgamestreamingconnectionstate)\
[XGameStreamingUnregisterConnectionStateChanged](/reference/system/xgamestreaming/functions/xgamestreamingunregisterconnectionstatechanged)\
[XGameStreamingRegisterConnectionStateChanged](/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged)\
[XGameStreaming](/reference/system/xgamestreaming/xgamestreaming_members#ConnectionState)


## Related topics

- [XGameStreamingGetClients](/zh-CN/reference/system/xgamestreaming/functions/xgamestreaminggetclients.md)
- [XGameStreamingGetClientCount](/zh-CN/reference/system/xgamestreaming/functions/xgamestreaminggetclientcount.md)
- [XGameStreamingGetConnectionState](/zh-CN/reference/system/xgamestreaming/functions/xgamestreaminggetconnectionstate.md)
- [XGameStreaming](/zh-CN/reference/system/xgamestreaming/xgamestreaming_members.md)
- [XGameStreamingUnregisterConnectionStateChanged](/zh-CN/reference/system/xgamestreaming/functions/xgamestreamingunregisterconnectionstatechanged.md)
