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

play/pause when Enter is pressed on non-dragging position slider #5685

Closed
wants to merge 2 commits into from

Conversation

shoffing
Copy link
Contributor

@shoffing shoffing commented Jun 9, 2024

Hey there, first time contributor here! Open to any and all feedback.

Changes

Background: This fixes a minor annoyance while using Jellyfin on my LG TV that does not have a play/pause media button on the remote (only an "OK" button between the navigation arrows):

image

Current behavior

Pressing "Enter" on the now playing position slider when it is not being dragged does nothing. This means resuming playback after scrubbing the position slider requires 4 inputs every time to manually click the OSD Play button: Down -> Right -> Right -> OK

New behavior

Pressing "Enter" on the position slider when it is not being dragged will play/pause the current media. Now resuming playback after scrubbing only requires one remote input: OK

To achieve this, I needed to dispatch a new event "playpause" from the emby-slider component, and listen for that event in the playback/video controller.

Manual testing

I tested these changes manually using LG's simulator.

@shoffing shoffing requested a review from a team as a code owner June 9, 2024 18:27
@dmitrylyzo
Copy link
Contributor

dmitrylyzo commented Jun 9, 2024

Play/pause should not be in the slider - it is a generic element that is not tied to playback. You probably need to catch click (or keydown) event from the slider when it was not processed by the slider.

@dmitrylyzo
Copy link
Contributor

I suggest you not to use your master branch for PRs. Create a separate branch from your current master (it will contain current changes) and open a new PR with the new branch (AFAIK, there's no way to change the source branch of PR).

Copy link

sonarcloud bot commented Jun 9, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@shoffing
Copy link
Contributor Author

shoffing commented Jun 9, 2024

Closed in favor of #5687

@shoffing shoffing closed this Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants