-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add User-Configurable Playback Duration for Media Segment Start and End #6200
base: master
Are you sure you want to change the base?
Conversation
Cloudflare Pages deployment
|
StartTicks: segment.StartTicks !== undefined ? segment.StartTicks + startPlayTime : undefined, | ||
EndTicks: segment.EndTicks !== undefined ? segment.EndTicks - endPlayTime : undefined |
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 we should validate that this doesn't result in StartTicks > EndTicks
?
Could you explain your use case? It can be an adjustment to seek before an exact start/end time. But one setting is enough, imo. It can also be used for prev/next chapter buttons. |
My intention is to allow users to adjust playback slightly before the segment ends, similar to how Netflix jumps a couple of seconds before the intro ends so that you still see the show's logo and avoid cutting off any actual content. Regarding the settings—did I overlook an existing option that already handles this, or would this be a useful new feature? |
That's exactly what I meant. But why do you need two separate settings, one for the beginning and one for the end? UPD:
There is currently no such adjustment. I just mean that the new setting can also be used to navigate through chapters. |
Quality Gate passedIssues Measures |
Applies the user's segment end setting to the next chapter skip feature. Also removes the previous adjustment for start position. |
I really just don't see the point in this. If there is an issue with the segment timing that seems like an issue with either the media or the plugin providing the segment data. 🤷♂️ |
It's not a segment issue, it's more a user preference. At the moment we have that in our plugin and we have users who adjust the timings. Since there can be multiple plugins, it makes sense to move this to jellyfin now. I think that was @rlauuzo intention. |
Allow me to chime in with some use cases that may have been overlooked.
I completely understand the assumption that the detection is the problem. Ironically, it’s that the detection is too precise, but it’s far easier to provide flexibility than try to force every file and user to come to an agreement. |
Shifting the start and end times of segments is something the segment provider should do. We could add options for that to our chapter segment provider if there is demand. It's definitely not up to the client to do. A client does not know the source of a segment and thus what the timings are based on. |
That's fine. Keep in mind that the more you defer to the provider, the more heavily you are relying on a provider to be the feature. While a clean UI matters, the button and an endpoint is essentially the only part of the feature Jellyfin has actually integrated. All of the settings will still be performed in a plugin.
Please don't. This only creates a more elaborate and confusing process for the user with far more risk of issues and error. |
I strongly disagree with that position. It's akin to suggesting that subtitle offset adjustments shouldn't be handled by the client. Instead, subtitle providers should rewrite all subtitle files with modified timings whenever a simple setting like offset is changed. |
This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged. |
I think the key part of this improvement is that it's not shifting the segment. It's giving an option to resume playback a few seconds before the segment ends. I think it's great that segments are exactly accurate in start/end ticks. But, a user should have the option to skip the segment, but resume a few seconds early. |
It isn't an issue with the segment data. The segment data is 100% accurate. Is is just the user preference to show a few seconds of the skipped intro or other media segment. Skipping right to end end of an intro can be jarring, and an option to view the last few seconds of the intro helps with this. This is a capability of the Intro Skipper plugin I heavily use and would appreciate being formally added to Jellyfin. |
} catch (err) { | ||
console.error('[MediaSegmentManager] failed to fetch segments', err); | ||
this.mediaSegments = []; | ||
} | ||
} | ||
|
||
private adjustMediaSegments(segments: MediaSegmentDto[]): MediaSegmentDto[] { |
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.
In order to decrease confusion, I wonder if this method should be renamed to applySegmentSkipPreferences()
(or something along those lines, so that it's clear that you aren't adjusting the segment itself).
Introduces new user-configurable settings for adjusting the playback duration of media segment start and end times. The MediaSegmentManager is updated to pre-adjust segments based on these settings, giving users greater flexibility in playback control.