# Enumeration SessionState

Defines the states of a CloudXR streaming session.

The session follows a well-defined lifecycle with distinct states and transitions:

    Initialized → Connecting → Connected → Disconnecting → Disconnected

#### Example

    // Check session state
    if (session.state === SessionState.Connected) {
      console.info('Session is ready for rendering');
    }

#####
Index

### Enumeration Members

Initialized
Connecting
Connected
Disconnecting
Disconnected
Error

##
Enumeration Members

### Initialized

Initialized: "Initialized"

Initial state when the session is created but connect() has not been called.

The session is ready to be configured and connected. No network activity or streaming occurs.

### Connecting

Connecting: "Connecting"

The session is attempting to establish a connection and start streaming.

The session is actively trying to connect to the CloudXR Runtime. This state is temporary and transitions to either Connected or Error.

### Connected

Connected: "Connected"

The session is fully active and ready to render.

Connection is established, video streaming is active, and WebGL resources are ready. This is the normal operational state for rendering CloudXR content.

### Disconnecting

Disconnecting: "Disconnecting"

The session is in the process of disconnecting from the CloudXR Runtime.

The session is actively closing the connection and cleaning up resources. This state is temporary and transitions to Disconnected.

### Disconnected

Disconnected: "Disconnected"

The session has been disconnected and is ready to be reconnected.

The session has been cleanly disconnected and can be reconnected by calling connect() again.

### Error

Error: "Error"

The session encountered a critical error and cannot continue.

The session has encountered an unrecoverable error. Destroy and recreate the session to recover. Check error details in the onStreamStopped delegate callback.