Check for the correct media id when ensuring the MediaPlayer is ready (#1783)
Just forgot to add this further condition.
This commit is contained in:
parent
7a4adf3e28
commit
e3cfe70ba8
1 changed files with 1 additions and 1 deletions
|
|
@ -116,7 +116,7 @@ class MediaPlayerImpl @Inject constructor(
|
||||||
)
|
)
|
||||||
player.prepare()
|
player.prepare()
|
||||||
// Will throw TimeoutCancellationException if the player is not ready after 1 second.
|
// Will throw TimeoutCancellationException if the player is not ready after 1 second.
|
||||||
return state.timeout(1.seconds).first { it.isReady }
|
return state.timeout(1.seconds).first { it.isReady && it.mediaId == mediaId }
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun play() {
|
override fun play() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue