> ## Documentation Index
> Fetch the complete documentation index at: https://docs.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](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged.md) 注册回调。

## 示例

```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](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/enums/xgamestreamingconnectionstate.md)\
[XGameStreamingUnregisterConnectionStateChanged](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/functions/xgamestreamingunregisterconnectionstatechanged.md)\
[XGameStreamingRegisterConnectionStateChanged](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged.md)\
[XGameStreaming](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/xgamestreaming_members.md#ConnectionState)


## Related topics

- [XGameStreamingGetClients](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/functions/xgamestreaminggetclients.md)
- [XGameStreamingGetClientCount](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/functions/xgamestreaminggetclientcount.md)
- [XGameStreamingGetConnectionState](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/functions/xgamestreaminggetconnectionstate.md)
- [XGameStreaming（API 内容）](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/xgamestreaming_members.md)
- [XGameStreamingUnregisterConnectionStateChanged](https://docs.xbox.com/zh-CN/reference/system/xgamestreaming/functions/xgamestreamingunregisterconnectionstatechanged.md)
