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
[videoplayer] Go to Chapter Start for "Previous Chapter" Past Grace Period #24066
Conversation
7a5674f
to
92239e0
Compare
I like the change and I think improves usability as users surely expect skip to previous chapter allows skip to previous chapter mark. Is not intuitive skip two chapters mark back (although is technically correct). But current change in PR only changes this for keyboard actions up / down and not if is used OSD playback menu. To maintain coherence same changes should be applied here: xbmc/xbmc/cores/VideoPlayer/VideoPlayer.cpp Line 4516 in 22a988a
and here xbmc/xbmc/cores/VideoPlayer/VideoPlayer.cpp Line 4389 in 22a988a
This allows OSD buttons has same behavior. |
92239e0
to
4f57b5e
Compare
Good catch. Reimplemented as function GetPreviousChapter() used by the 3 callers. Tried testing the |
4f57b5e
to
aae7b55
Compare
xbmc/cores/VideoPlayer/VideoPlayer.h
Outdated
@@ -323,6 +323,7 @@ class CVideoPlayer : public IPlayer, public CThread, public IVideoPlayer, | |||
int GetChapter() const override; | |||
void GetChapterName(std::string& strChapterName, int chapterIdx = -1) const override; | |||
int64_t GetChapterPos(int chapterIdx = -1) const override; | |||
int GetPreviousChapter(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe move to line 372 after void SetUpdateStreamDetails();
as all others are override and usually overrides are enumerated first (anyway is only personal preference).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure. makes sense though, Also made it protected, we tend to make too much stuff public for no reason.
aae7b55
to
074f6c8
Compare
After a grace delay, a backwards chapter skip goes to the beginning of the current chapter instead of skipping to the beginning of the previous chapter.
074f6c8
to
909d4ff
Compare
Description
Modify VP actions when a backwards chapter skip is requested ("previous chapter", "previous chapter or big step back" actions)
Skip requested within 5 seconds of chapter start: go to the beginning of the previous chapter (same as current behavior)
Skip requested past 5 seconds from chapter start: go to the beginning of the current chapter.
(5 seconds taken from similar code used for scenes, could be adjusted)
Motivation and context
I find the current behavior of going to the previous chapter regardless of the playing position in the current chapter unintuitive, even though it's technically correct.
For example in the situation below, skipping to previous chapter goes to the very beginning position 00:00, even though playback is almost at the end of chapter 2.
In addition, I didn't find a way to go back to the start of the currently playing chapter.
I think it's a nice improvement to extend the previous chapter action, and to make it go back to the start of the current chapter after a certain time has passed in the current chapter. It avoids the need to map another button on a remote or on keyboard for a "back to chapter start" function.
How has this been tested?
Windows, but platform is not relevant.
Files with / without chapters, skip backwards before 5 seconds of playback
What is the effect on users?
More intuitive behavior for chapter backwards skip / Down key for large step or chapter back.
Screenshots (if appropriate):
Initial situation:
Current master: "previous chapter"goes to the beginning of the file
With PR, "previous chapter" goes to start of the current chapter:
An additional "previous chapter" within 5 seconds of chapter start goes to the previous chapter (=beginning of the file here).
Types of change
Checklist: