Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Event issue at initialization #43

Open
ghost opened this issue Mar 27, 2017 · 12 comments
Open

Event issue at initialization #43

ghost opened this issue Mar 27, 2017 · 12 comments

Comments

@ghost
Copy link

ghost commented Mar 27, 2017

Thanks for this awesome library.
I'm facing an issue, at initialization, PSVolumeButtonHandler adjusts the volume to avoid a maximum or minimum state (i suppose that in this state, it will couldn't detect any event on volume buttons).
But when adjusting, it's triggering by itself and call the upBlock or downBlock.

how to avoid that ?

@jpsim
Copy link
Owner

jpsim commented Mar 27, 2017

That shouldn't happen. Maybe someone more actively involved in this library than I would be able to make a repro case?

@apple-ihack-geek
Copy link
Contributor

We are seeing this in our app currently using 1.0.2, I'm going to retry with latest master

@jasongaare
Copy link

I'm seeing this issue also.

@jpsim
Copy link
Owner

jpsim commented Apr 27, 2017

@titiSbr @apple-ihack-geek @jasongaare I assume you're all seeing this with 1.0.4 too? There's an unfortunate lack of information or repro cases in this thread 😞

@apple-ihack-geek
Copy link
Contributor

apple-ihack-geek commented Apr 28, 2017

After further review, My issue was slightly different. Mine was not at initialization, mine was an event issue by another event (an infinitient loop of volume presses). Sadly, I had to pull the button handler our entirely due to another issue I'm not sure how to resolve, #46

@apple-ihack-geek
Copy link
Contributor

For other people still experiencing this, you can try the new exactJumpsOnly feature #45

@jpeyer
Copy link

jpeyer commented May 2, 2017

The exact jumps feature worked for me, but caused a different issue where the min/max logic no longer works.

I think the problem is that -[JPSVolumeButtonHandler startHandler:] is calling setupSession too early (in addition to calling it twice). The first call should not be there, and it causes the delayed second call to do nothing, because isStarted is set to true the first time setupSession is called). After I removed that line, I haven't seen the issue.

@xaphod
Copy link

xaphod commented Jun 12, 2017

I'm seeing this too. With JPSVBH included, about 75% of the time when I start my app I see the volume level displayed and then the up handler fires. The volume level never displays if I take out JPSVBH

@genericwoods
Copy link

This is happening for me as well. exactJumpsOnly avoids this issue, but also stops the handler from firing at all for min/max volumes

@apple-ihack-geek
Copy link
Contributor

@genericwoods Are you sure you're using the latest version? The not firing at max/min was an bug (of my own doing) but was fixed with #47 (or so I think).

@genericwoods
Copy link

genericwoods commented Jun 20, 2017

@apple-ihack-geek we’re using 1.0.4 via Cocoapods – is #47 included in that release?

Edit: Nevermind, noticed on the issue that it was never tagged for release, moved the conversation over there

@apple-ihack-geek
Copy link
Contributor

@genericwoods no, it hasn't had a release tag yet. For now, you should be able to manually set it to commit id 08850cf. Give that a try.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants