AUMediaPlayer icon indicating copy to clipboard operation
AUMediaPlayer copied to clipboard

False negative playerIsPlaying

Open kmckinley opened this issue 9 years ago • 1 comments

I'm running in to an issue where I can get the player in a state where it things it is paused but really the audio is playing.

I get into this state by playing a queue, leave the app in the foreground, and then put my phone in sleep mode. Let it play like this for about 5-10 minutes. Wake the phone up and the playerIsPlaying will return NO even though the audio is playing. This is on a iPhone 5s with iOS 8.3. I'll run the same test on other devices and report back the results

The below method in AUMediaPlayer will return 0.0 for self.player.rate

- (BOOL)playerIsPlaying {
    if (self.player.rate > 0.0f && self.player.error == nil) {
        return YES;
    }
    return NO;
}

kmckinley avatar Apr 23 '15 16:04 kmckinley

On an iPod touch (5th generation) iOS 7.0.3 it happens anytime I let the a song play the entire track and then go to the next. If I manually call playNext it works fine.

kmckinley avatar Apr 23 '15 16:04 kmckinley