[android-components](../index.md) / [mozilla.components.feature.media.ext](index.md) / [getSession](./get-session.md)

# getSession

`fun `[`MediaState`](../mozilla.components.feature.media.state/-media-state/index.md)`.getSession(): `[`Session`](../mozilla.components.browser.session/-session/index.md)`?` [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/feature/media/src/main/java/mozilla/components/feature/media/ext/MediaState.kt#L31)

Get the [Session](../mozilla.components.browser.session/-session/index.md) that caused this [MediaState](../mozilla.components.feature.media.state/-media-state/index.md) (if any).

