# Class: SessionStateEventData

# cast.[framework](https://developers.google.com/cast/docs/reference/web_sender/cast.framework.md.txt).SessionStateEventData

class static

Data for session state changed event.

## Constructor

### SessionStateEventData

new
SessionStateEventData(session, sessionState, opt_errorCode)

| #### Parameter ||
|---|---|
| session | [cast.framework.CastSession](https://developers.google.com/cast/docs/reference/web_sender/cast.framework.CastSession.md.txt) Current session if available. Value may be null. |
| sessionState | [cast.framework.SessionState](https://developers.google.com/cast/docs/reference/web_sender/cast.framework.md.txt#.SessionState) Current session state. Value must not be null. |
| opt_errorCode | Optional [chrome.cast.ErrorCode](https://developers.google.com/cast/docs/reference/web_sender/chrome.cast.md.txt#.ErrorCode) Optional error code for start failed state. Value must not be null. |

## Properties

### errorCode

nullable [chrome.cast.ErrorCode](https://developers.google.com/cast/docs/reference/web_sender/chrome.cast.md.txt#.ErrorCode)

Session start failure reason.

### session

nullable [cast.framework.CastSession](https://developers.google.com/cast/docs/reference/web_sender/cast.framework.CastSession.md.txt)

Cast session.

### sessionState

non-null [cast.framework.SessionState](https://developers.google.com/cast/docs/reference/web_sender/cast.framework.md.txt#.SessionState)

Cast session state.