STATE_ENDED not reached with Cast extension
- Dominant language
- Java
- Stars
- 21.9k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
First of all i want to congrat you for this amazing extension, it makes cast integration much easier than Google Cast SDK.
### Issue description
I want to detect when playback has finished to play next track. I know i could use DynamicConcatenatingMediaSource, but i need a previous process before a track starts, so i'm doing it manually. With SimpleExoPlayerView i get ENDED state when tracks ends, but with cast extension don't, i get IDLE state and "playWhenReady" with "true" value.
If this isn't a bug please tell me how can i detect with cast extension that playback has finished.
### Reproduction steps
Connect to Chromecast, playing one video (from an URL) and put a log at onPlayerStateChanged that shows the playback state.
### Link to test content
https://www.skillscommons.org/bitstream/handle/taaccct/10109/Operational%20Amplifiers%20(1).mp4
But it happens with any URL i tested.
### Version of ExoPlayer being used
2.7.0
### Device(s) and version(s) of Android being used
Google Pixel 2 XL, Android 8.1.0 and a Chromecast connected to my TV.
### A full bug report captured from the device
I don't get any exception or message, it's just i can't detect when video is over.
Contributor guide
Assessment
This issue has not been assessed yet.