Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Media key causes a play/pause loop #49

Closed
Tuttles opened this issue Apr 19, 2021 · 7 comments
Closed

[bug] Media key causes a play/pause loop #49

Tuttles opened this issue Apr 19, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@Tuttles
Copy link

Tuttles commented Apr 19, 2021

Describe the bug
While watching a video, pressing the play/pause button once on my headphones causes it to continuously spam the play/pause button making the video stutter. This lasts until I change videos or close the player.

Desktop (please complete the following information):

  • OS: Windows 10
  • Version 2004 (OS Build 19041.928)

Error Messages

2021-04-19 12:35:59 [ INFO  ] JS: Received KeepAlive from server. 
2021-04-19 12:36:01 [ DEBUG ] InputComponent.cpp @ 160 - Input received: source: "Keyboard" keycode: "Media Play" : InputBase::KeyUp 
2021-04-19 12:36:01 [ DEBUG ] InputComponent.cpp @ 160 - Input received: source: "Keyboard" keycode: "Media Play" : InputBase::KeyDown 
2021-04-19 12:36:01 [ DEBUG ] CachedRegexMatcher.cpp @ 68 - No match for: "Keyboard" 
2021-04-19 12:36:01 [ DEBUG ] CachedRegexMatcher.cpp @ 68 - No match for: "Media Play" 
2021-04-19 12:36:01 [ DEBUG ] InputComponent.cpp @ 229 - Emit input action: ("play_pause") 
2021-04-19 12:36:01 [ DEBUG ] PlayerComponent.cpp @ 578 - cplayer: Set property: pause=yes -> 1 
2021-04-19 12:36:01 [ INFO  ] PlayerComponent.cpp @ 442 - Entering state: paused 
2021-04-19 12:36:01 [ INFO  ] JS: Requesting url without automatic networking: http://127.0.0.1:8096/Sessions/Playing/Progress 
2021-04-19 12:36:02 [ DEBUG ] InputComponent.cpp @ 69 - Emit input action (autorepeat): ("play_pause") 
2021-04-19 12:36:02 [ DEBUG ] PlayerComponent.cpp @ 578 - cplayer: Set property: pause=no -> 1 
2021-04-19 12:36:02 [ INFO  ] PlayerComponent.cpp @ 446 - Entering state: playing 
2021-04-19 12:36:02 [ INFO  ] JS: Requesting url without automatic networking: http://127.0.0.1:8096/Sessions/Playing/Progress 
2021-04-19 12:36:02 [ DEBUG ] InputComponent.cpp @ 69 - Emit input action (autorepeat): ("play_pause") 
2021-04-19 12:36:02 [ DEBUG ] PlayerComponent.cpp @ 578 - cplayer: Set property: pause=yes -> 1 
2021-04-19 12:36:02 [ INFO  ] PlayerComponent.cpp @ 442 - Entering state: paused 
2021-04-19 12:36:02 [ INFO  ] JS: Requesting url without automatic networking: http://127.0.0.1:8096/Sessions/Playing/Progress 
2021-04-19 12:36:02 [ DEBUG ] InputComponent.cpp @ 69 - Emit input action (autorepeat): ("play_pause") 
2021-04-19 12:36:02 [ DEBUG ] PlayerComponent.cpp @ 578 - cplayer: Set property: pause=no -> 1 
2021-04-19 12:36:02 [ INFO  ] PlayerComponent.cpp @ 446 - Entering state: playing 
2021-04-19 12:36:02 [ INFO  ] JS: Requesting url without automatic networking: http://127.0.0.1:8096/Sessions/Playing/Progress 
2021-04-19 12:36:02 [ DEBUG ] InputComponent.cpp @ 69 - Emit input action (autorepeat): ("play_pause") 
2021-04-19 12:36:02 [ DEBUG ] PlayerComponent.cpp @ 578 - cplayer: Set property: pause=yes -> 1 
2021-04-19 12:36:02 [ INFO  ] PlayerComponent.cpp @ 442 - Entering state: paused 
2021-04-19 12:36:02 [ INFO  ] JS: Requesting url without automatic networking: http://127.0.0.1:8096/Sessions/Playing/Progress 
2021-04-19 12:36:02 [ DEBUG ] InputComponent.cpp @ 69 - Emit input action (autorepeat): ("play_pause") 
2021-04-19 12:36:02 [ DEBUG ] PlayerComponent.cpp @ 578 - cplayer: Set property: pause=no -> 1 
2021-04-19 12:36:02 [ INFO  ] PlayerComponent.cpp @ 446 - Entering state: playing 
2021-04-19 12:36:02 [ INFO  ] JS: Requesting url without automatic networking: http://127.0.0.1:8096/Sessions/Playing/Progress 
2021-04-19 12:36:02 [ DEBUG ] InputComponent.cpp @ 69 - Emit input action (autorepeat): ("play_pause") 
2021-04-19 12:36:02 [ DEBUG ] PlayerComponent.cpp @ 578 - cplayer: Set property: pause=yes -> 1 
2021-04-19 12:36:02 [ INFO  ] PlayerComponent.cpp @ 442 - Entering state: paused 
2021-04-19 12:36:02 [ INFO  ] JS: Requesting url without automatic networking: http://127.0.0.1:8096/Sessions/Playing/Progress 
2021-04-19 12:36:02 [ DEBUG ] InputComponent.cpp @ 69 - Emit input action (autorepeat): ("play_pause") 
2021-04-19 12:36:02 [ DEBUG ] PlayerComponent.cpp @ 578 - cplayer: Set property: pause=no -> 1 
2021-04-19 12:36:02 [ INFO  ] PlayerComponent.cpp @ 446 - Entering state: playing 
2021-04-19 12:36:02 [ INFO  ] JS: Requesting url without automatic networking: http://127.0.0.1:8096/Sessions/Playing/Progress 
2021-04-19 12:36:02 [ DEBUG ] InputComponent.cpp @ 69 - Emit input action (autorepeat): ("play_pause") 
2021-04-19 12:36:02 [ DEBUG ] PlayerComponent.cpp @ 578 - cplayer: Set property: pause=yes -> 1 
2021-04-19 12:36:02 [ INFO  ] PlayerComponent.cpp @ 442 - Entering state: paused 
2021-04-19 12:36:02 [ INFO  ] JS: Requesting url without automatic networking: http://127.0.0.1:8096/Sessions/Playing/Progress 
2021-04-19 12:36:02 [ DEBUG ] InputComponent.cpp @ 69 - Emit input action (autorepeat): ("play_pause") 
2021-04-19 12:36:02 [ DEBUG ] PlayerComponent.cpp @ 578 - cplayer: Set property: pause=no -> 1 
2021-04-19 12:36:02 [ INFO  ] PlayerComponent.cpp @ 446 - Entering state: playing 

This error continues until I close the application.

@iwalton3 iwalton3 added the bug Something isn't working label Apr 19, 2021
@iwalton3
Copy link
Member

iwalton3 commented Apr 19, 2021

It looks like the player caught a "Key Up" action before a "Key Down" action, which is very odd. Is this consistent?

It thinks you are holding down the play button which I will admit doesn't make sense.

@Tuttles
Copy link
Author

Tuttles commented Apr 19, 2021

Its only happening with my bluetooth earbuds, my keyboard media keys work fine. But yes it happens every time, I've tried hitting the button multiple times but it doesn't stop.

edit: using the media keys on my keyboard actually fix the play/pause loop from my earbuds.

@iwalton3
Copy link
Member

Which makes sense since the earbuds are what appear to be emitting a keyup event and then a keydown event. The problem with this is it looks like the button is being held down to the player.

@iwalton3
Copy link
Member

I added a config option to disable repeating of keys for bugged-out input devices. It is under "Client Settings":

image

There is a test build in: https://github.com/jellyfin/jellyfin-media-player/actions/runs/765444199

(When the build finishes you'll be able to download the artifact for your platform that contains the installer.)

@Tuttles
Copy link
Author

Tuttles commented Apr 20, 2021

Thanks a ton! Really appreciate your work on this player.

@iwalton3
Copy link
Member

Did it work? You can download a test release here: https://github.com/jellyfin/jellyfin-media-player/suites/2534819239/artifacts/54992985

@Tuttles
Copy link
Author

Tuttles commented Apr 20, 2021

Just tested it out, working perfect now with enableInputRepeat unchecked in the settings.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants