[android-components](../../../index.md) / [mozilla.components.feature.media.state](../../index.md) / [MediaStateMachine](../index.md) / [Observer](index.md) / [onStateChanged](./on-state-changed.md)

# onStateChanged

`abstract fun onStateChanged(state: `[`MediaState`](../../-media-state/index.md)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/feature/media/src/main/java/mozilla/components/feature/media/state/MediaStateMachine.kt#L99)

The [MediaState](../../-media-state/index.md) has changed.

