mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00:00
A fatal `PlaybackException` is mapped to a legacy playback state in state `STATE_ERROR` with error code, message and extras. A non-fatal error sent to controllers with `MediaSession.sendError` is synced to the legacy session by setting error code and message and merging the extras while preserving the rest of the state in sync with the session player. Vice versa, a `MediaController` connected to a legacy session receives fatal errors through `Player.onPlayerErrorChanged()` and non-fatal errors through `MediaController.Listener.onError()`. Error codes are mapped in `LegacyConversions`. Values of error codes in `@SessionError.ErrorCode` come from `@PlaybackExceptino.ErrorCode` with the exception of `@SessionError.ERROR_IO` and `@SessionError.ERROR_UNKNOWN`. These already exist in `@PlaybackException.ErrorCode` and are mapped accordingly to avoid semantic duplicates. PiperOrigin-RevId: 642595517 |
||
|---|---|---|
| .. | ||
| src | ||
| build.gradle | ||
| lint-baseline.xml | ||
| proguard-rules.txt | ||
| README.md | ||