MediaPlayer.getDuration()在Android 2.1中提供不正确的值或0

时间:2012-01-04 11:10:15

标签: android media-player duration

  

我正在研究android中的流音频应用程序。我正在接受   Android媒体播放器中的以下问题。

         1 MediaPlayer.getDuration() method returning 0 at sometime 
         but still its playing the song.
       2 some times MediaPlayer.getDuration() method returning wrong duration.
    **Some more info**
       1 I am caching the files from the server to the sdcard and
         streaming it to the media player through local http.
       2 All songs which is streamed is only mp3 files.
       3 Gives Correct duration when the network is good.

       If you guys find any fixes please direct me to the possible solution.

Thanks in advance.

0 个答案:

没有答案