am a476eed6: Merge "getDuration can be only called after prepared. DO NOT MERGE" into ics-mr1
* commit 'a476eed6b291d06f5e571597b928b7b2f0b3f257': getDuration can be only called after prepared. DO NOT MERGE
This commit is contained in:
@@ -311,7 +311,11 @@ class HTML5Audio extends Handler
|
|||||||
}
|
}
|
||||||
|
|
||||||
private float getMaxTimeSeekable() {
|
private float getMaxTimeSeekable() {
|
||||||
return mMediaPlayer.getDuration() / 1000.0f;
|
if (mState >= PREPARED) {
|
||||||
|
return mMediaPlayer.getDuration() / 1000.0f;
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void nativeOnBuffering(int percent, int nativePointer);
|
private native void nativeOnBuffering(int percent, int nativePointer);
|
||||||
|
|||||||
Reference in New Issue
Block a user