Make audio tag cope with live streams
Live streams seem to take a little while to initialize, so it's feasible that we might get a play request before transitioned to the PREPARED state. In that case track that we should start playing when onPrepare completes. Change-Id: I66ed0ef3a0905a1c5d4206fb2e7bbcc05a593fc7
This commit is contained in:
@@ -179,7 +179,7 @@ class HTML5Audio extends Handler
|
||||
}
|
||||
|
||||
private void play() {
|
||||
if ((mState == ERROR || mState == IDLE) && mUrl != null) {
|
||||
if ((mState >= ERROR && mState < PREPARED) && mUrl != null) {
|
||||
resetMediaPlayer();
|
||||
setDataSource(mUrl);
|
||||
mAskToPlay = true;
|
||||
|
||||
Reference in New Issue
Block a user