Android歌词秀设计思路(3)通用的音乐播放服务(上)(3)
来源:未知 责任编辑:责任编辑 发表时间:2014-05-10 12:23 点击:次
}
public void pause() {
giveUpAudioFocus();
mIsPausing = true;
mMediaPlayer.pause();
}
public void playNext(){
if(mMediaInfoProvider.moveToNext()){
if(isPlaying() || isPausing()){
stop();
}
mDataSource = mMediaInfoProvider.getUrl();
mTitle = mMediaInfoProvider.getTitle();
start();
}
}
public void playPrev(){
if(mMediaInfoProvider.moveToPrev()){
if(isPlaying() || isPausing()){
stop();
}
mDataSource = mMediaInfoProvider.getUrl();
mTitle = mMediaInfoProvider.getTitle();
start();
}
}
public boolean isPausing(){
return mIsPausing;
}
public boolean isPlaying() {
return mMediaPlayer.isPlaying();
}
public boolean isStop(){
return (isPlaying() == false && isPausing() == false);
}
public int getDuration() {
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>