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 #5687

Merged
merged 2 commits into from
Jul 10, 2024

Conversation

shoffing
Copy link
Contributor

@shoffing shoffing commented Jun 9, 2024

(new PR created because #5685 was wrong branch)

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 play/pause the video in a new "keydown" listener attached to the position slider in the video controller. It does not play/pause if default was prevented (which happens when the slider is dragged (left/right arrows) and Enter is pressed).

Manual testing

I tested these changes manually using LG's simulator.

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

@dmitrylyzo dmitrylyzo added this to the v10.10.0 milestone Jun 9, 2024
@dmitrylyzo dmitrylyzo added feature New feature or request ui & ux This PR or issue mainly concerns UI & UX labels Jun 9, 2024
Copy link
Contributor

@dmitrylyzo dmitrylyzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Commits can be squashed.

We probably need to fix Space when the focus is on the slider (not in this PR). Currently it moves the focus to btnPause:

UPD:
I think we should add the same behaviour (playpause on Enter) for the position slider in the queue page (probably in a new PR or in a separate commit):

positionSlider.addEventListener('change', function () {

@thornbill thornbill added enhancement Improve existing functionality or small fixes and removed feature New feature or request labels Jun 25, 2024
@thornbill thornbill merged commit 9186c0a into jellyfin:master Jul 10, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve existing functionality or small fixes ui & ux This PR or issue mainly concerns UI & UX
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants