Skip to content

Should have subtitle controller already set Mediaplayer error #30

@ghost

Description

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);
.......
.......

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions