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

Create pause menu #1461

Merged
merged 10 commits into from
Nov 10, 2023
Merged

Create pause menu #1461

merged 10 commits into from
Nov 10, 2023

Conversation

1hitsong
Copy link
Member

@1hitsong 1hitsong commented Oct 31, 2023

Changes

Creates a menu displayed when the user pauses playback of a video. The trickplay bar is no longer shown. This changes current behavior. The trickplay bar is still accessed by pressing left, right, rewind, or fast forward on the remote while the video is playing.

The menu has 3 buttons:

  1. List of all found chapters with current chapter in focus
  2. Previous chapter
  3. Next Chapter

The menu is designed to handle more icons and functions in the future.

If user tries to go before chapter 1, it simply replays the chapter from the start. User can not go beyond last chapter, instruction is ignored.

Chapter names are used in the list, so if user has a chapter named "It's All Over" instead of "Chapter 1," "It's All Over" will be displayed.

If no chapter data is found, buttons are still displayed, but are inactive. Chapter list displays "No chapter data found" and is also inactive.

Issues

Fixes #445

Notes

This PR uses a param introduced in Roku OS 10, video.seekMode. This param is needed to make the chapter selection accurate.

Determining current chapter isn't perfect. We must compare Roku's video position param(seconds) to the chapter start time (ticks), so we must convert one of the numbers to the other format. The converted number drifts away from accuracy, especially late in movies when the values are at their highest. This can cause the current chapter lookup to be incorrect. As a result, late in a video a user may find they need to wait 2-3 seconds for the video position to advance past the chapter start value so they can skip to the next chapter. This issue can also cause the chapter list auto focus to be 1 chapter behind late in a movie.

Update. Adding a 15 second buffer to the current position fixed the issue I mentioned above. This fix is reflected in this PR.

Screenshot

pauseMenu

Demo

https://social.linux.pizza/@tgpo/111327355574987355

@1hitsong 1hitsong requested a review from a team as a code owner October 31, 2023 14:20
@lakerssuperman
Copy link

Wow. This looks awesome! Special points for include a A Nightmare on Elm Street Part 2 screenshot!

components/video/PauseMenu.brs Outdated Show resolved Hide resolved
@cewert
Copy link
Member

cewert commented Nov 4, 2023

The code looks good.

Right now the next chapter buttons are called previous and next but maybe we should rename them to previous-chapter and next-chapter? Eventually we will need icons for previous item(in playlist) and next item too.

@cewert cewert added the feature A new feature that currently doesn't exist. label Nov 5, 2023
components/Clock.xml Outdated Show resolved Hide resolved
@jellyfin-bot jellyfin-bot added the merge-conflict This PR has a merge conflict label Nov 9, 2023
@jellyfin-bot
Copy link
Contributor

This pull request has merge conflicts. Please resolve the conflicts so the PR can be reviewed. Thanks!

@jellyfin-bot jellyfin-bot removed the merge-conflict This PR has a merge conflict label Nov 9, 2023
Copy link
Member

@cewert cewert left a comment

Choose a reason for hiding this comment

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

Works great. Nice job on this 👍

@cewert cewert merged commit 94c105d into jellyfin:unstable Nov 10, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature that currently doesn't exist.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add support for skipping to the next or previous chapter in a video
4 participants