You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The symptoms are that no music is playing, but if you turn the volume up or down and then play again it works. The fix is inserting mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
after initiating the mediaplayer. This is done in the constructor of StatelyPlayer, so the working code looks like this:
public StatelyPlayer(Context context) {
mMediaPlayer = new MediaPlayer();
mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
setWakeLock(context);
.......
.......
The text was updated successfully, but these errors were encountered:
I encountered this bug after using PlayerHater for a while:
http://stackoverflow.com/questions/21790824/mediaplayer-should-have-subtitle-controller-already-set-kitkat
The symptoms are that no music is playing, but if you turn the volume up or down and then play again it works. The fix is inserting mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
after initiating the mediaplayer. This is done in the constructor of StatelyPlayer, so the working code looks like this:
public StatelyPlayer(Context context) {
mMediaPlayer = new MediaPlayer();
mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
setWakeLock(context);
.......
.......
The text was updated successfully, but these errors were encountered: