PlayerHater icon indicating copy to clipboard operation
PlayerHater copied to clipboard

player.enqueue(Song) + player.play() would not start the song, Android 4.12

Open GeorgiAngelov opened this issue 11 years ago • 0 comments

    mPlayButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            if(mPlayerHater.getQueueLength() < 1){
                mPlayerHater.enqueue(new MySong(.........));
                mPlayerHater.play(mPlayerHater.getQueuePosition());
            }else{
                mPlayerHater.play(new MySong(.........));
            }
        }
    });

This one correctly adds the song to the queue(I even check queueLength), then plays the song at the queue position but the Plugin never fires and even the notifiaction bar doesn't appear.

If I remove the mPlayerHater.getQueuePosition(), and only execute mPlayerHater.play(); , nothing plays and the plugin goes through this routine:

02-04 17:04:15.203 8415-8415/com.example.app I/115522 AudioPlayingFragment﹕ onPaused() called 02-04 17:04:15.208 8415-8415/com.example.app I/115522 AudioPlayingFragment﹕ onStopped() called 02-04 17:04:15.218 8415-8415/com.example.app I/115522 AudioPlayingFragment﹕ onPaused() called 02-04 17:04:15.218 8415-8415/com.example.app I/115522 AudioPlayingFragment﹕ onStopped() called

GeorgiAngelov avatar Feb 07 '14 22:02 GeorgiAngelov