Compartilhar via


XGameStreamingIsStreaming

Determine if the game is currently being streamed.

Syntax

bool XGameStreamingIsStreaming();

Return value

Type: bool

XGameStreamingIsStreaming returns true if the game is running on an Xbox that has at least one streaming client device connected.

Remarks

XGameStreamingIsStreaming does not differentiate if the console is streaming via Remote Play or via Xbox Game Streaming.

To be notified of individual streaming client devices connecting and/or disconnecting consider registering a callback via XGameStreamingRegisterConnectionStateChanged.

Examples

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

Requirements

Header: xgamestreaming.h

Library: xgameruntime.lib

Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles

See also

XGameStreamingConnectionState
XGameStreamingUnregisterConnectionStateChanged
XGameStreamingRegisterConnectionStateChanged
XGameStreaming