Add option to limit hls segment length for webOS (#6530)
* -Add clientside ability to limit segment length to 1. See https://github.com/jellyfin/jellyfin-webos/issues/248 for details. -Add translations for this new setting (generated by github copilot). -Corrected small typo 'perfer'. * Move this to relevant scope * Revert translations except en-us * rewrite and relocate translation to alphabetical order * Relocate new setting to 'video advanced' heading instead of 'advanced' * Hide hls segment setting initially but show it for WebOS users. * Update src/components/playbackSettings/playbackSettings.js Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com> * Update src/components/playbackSettings/playbackSettings.js Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com> --------- Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com>
This commit is contained in:
@@ -864,6 +864,7 @@ export default function (options) {
|
||||
});
|
||||
|
||||
if (canPlayHls() && options.enableHls !== false) {
|
||||
const enableLimitedSegmentLength = userSettings.limitSegmentLength();
|
||||
if (hlsInFmp4VideoCodecs.length && hlsInFmp4VideoAudioCodecs.length && enableFmp4Hls) {
|
||||
// HACK: Since there is no filter for TS/MP4 in the API, specify HLS support in general and rely on retry after DirectPlay error
|
||||
// FIXME: Need support for {Container: 'mp4', Protocol: 'hls'} or {Container: 'hls', SubContainer: 'mp4'}
|
||||
@@ -883,7 +884,8 @@ export default function (options) {
|
||||
Protocol: 'hls',
|
||||
MaxAudioChannels: physicalAudioChannels.toString(),
|
||||
MinSegments: browser.iOS || browser.osx ? '2' : '1',
|
||||
BreakOnNonKeyFrames: hlsBreakOnNonKeyFrames
|
||||
BreakOnNonKeyFrames: hlsBreakOnNonKeyFrames,
|
||||
SegmentLength: enableLimitedSegmentLength ? 1 : undefined
|
||||
});
|
||||
}
|
||||
|
||||
@@ -906,7 +908,8 @@ export default function (options) {
|
||||
Protocol: 'hls',
|
||||
MaxAudioChannels: physicalAudioChannels.toString(),
|
||||
MinSegments: browser.iOS || browser.osx ? '2' : '1',
|
||||
BreakOnNonKeyFrames: hlsBreakOnNonKeyFrames
|
||||
BreakOnNonKeyFrames: hlsBreakOnNonKeyFrames,
|
||||
SegmentLength: enableLimitedSegmentLength ? 1 : undefined
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user