StreetVoice / HysteriaPlayer

Objective-C audio player, sitting on top of AVPlayer
Other
583 stars 99 forks source link

HysteriaPlayer paused state plays automatically after turning the screen on #114

Open arcioneo opened 8 years ago

arcioneo commented 8 years ago

Hi guys, I'm using HysteriaPlayer in my app; First of all, thanks, is a nice product, feel glad to use it.

Still,there is one little intermittent problem:

1) Play a song in my app 2) Pause the song 3) Turn off the screen(pushing the button hardware of course) 4) Wait some time (about 20 min) 5) Turn the screen on

Like some kind of sorcery, the song starts playing without pressing the play button.

I already checked my code(is not super complex) a lot of times and I'm pretty sure is not a bug in my app. BTW, is very hard to reproduce this error.

Any help would be appreciated.

Best regards.

mkc842 commented 8 years ago

I have the same problem.

Thanks for the product :)

saiday commented 8 years ago

Oh, thank you for reporting the issue. I had never experienced. investigating it!

arcioneo commented 8 years ago

I thought the same on first instance but we're not the only ones:

http://stackoverflow.com/questions/34797833/avqueueplayer-play-streaming-after-become-active-ipa-on-ipad-any-suggestion

4dmoonlight commented 8 years ago

I have the same problem

davros1970 commented 8 years ago

Me too! Having same issue. Thought it was my code, so sort of glad others reported this.

nathanwhy commented 8 years ago

Sometimes it will call [self.delegate hysteriaPlayerReadyToPlay:HysteriaPlayerReadyToPlayCurrentItem], after turning the screen on.

So you can not call play in hysteriaPlayerReadyToPlay of delegate.

arcioneo commented 8 years ago

Forgot to mention, if the device is in debug mode I cannot reproduce the error, only when is in normal mode

fabricioeus commented 7 years ago

any thoughts on this? im having the same problem...

arcioneo commented 7 years ago

Yes, I found what I thought was an error.

Stop monitoring(using observers) changes to variables of this tool>

In my case that was the trigger thats starts playing sometimes when the device become active. This is an inappropriate use for a framework but many of us do that.

BTW, maybe an extra could be to make variables appropiately to avoid users (like me ;) ) perform a bad use of internal variables