關于bug
if?(mMediaPlayer.isPlaying()?||?!path.equals(mPath)){ ????mMediaPlayer.reset(); }
老師您好,在startMusic中已經判斷過,只有當播放路徑不相同時才能進入setPath這個方法
所以在setPath方法中就不需要判斷直接
mMediaPlayer.reset();
請老師和各位同學一起驗證
if?(mMediaPlayer.isPlaying()?||?!path.equals(mPath)){ ????mMediaPlayer.reset(); }
老師您好,在startMusic中已經判斷過,只有當播放路徑不相同時才能進入setPath這個方法
所以在setPath方法中就不需要判斷直接
mMediaPlayer.reset();
請老師和各位同學一起驗證
2019-12-25
舉報
2023-06-11
確實,取消判斷直接reset后在切換音樂時就沒閃退了