mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
chore: reuse enableFmp4Hls for video and audio
This commit is contained in:
parent
4b054caebd
commit
f8b5c36fef
1 changed files with 4 additions and 8 deletions
|
@ -716,12 +716,12 @@ export default function (options) {
|
||||||
profile.TranscodingProfiles = [];
|
profile.TranscodingProfiles = [];
|
||||||
|
|
||||||
const hlsBreakOnNonKeyFrames = browser.iOS || browser.osx || browser.edge || !canPlayNativeHls();
|
const hlsBreakOnNonKeyFrames = browser.iOS || browser.osx || browser.edge || !canPlayNativeHls();
|
||||||
|
let enableFmp4Hls = userSettings.preferFmp4HlsContainer();
|
||||||
|
if ((browser.safari || browser.tizen || browser.web0s) && !canPlayNativeHlsInFmp4()) {
|
||||||
|
enableFmp4Hls = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (canPlayHls() && browser.enableHlsAudio !== false) {
|
if (canPlayHls() && browser.enableHlsAudio !== false) {
|
||||||
let enableFmp4Hls = userSettings.preferFmp4HlsContainer();
|
|
||||||
if ((browser.safari || browser.tizen || browser.web0s) && !canPlayNativeHlsInFmp4()) {
|
|
||||||
enableFmp4Hls = false;
|
|
||||||
}
|
|
||||||
profile.TranscodingProfiles.push({
|
profile.TranscodingProfiles.push({
|
||||||
Container: enableFmp4Hls ? 'mp4' : 'ts',
|
Container: enableFmp4Hls ? 'mp4' : 'ts',
|
||||||
Type: 'Audio',
|
Type: 'Audio',
|
||||||
|
@ -760,10 +760,6 @@ export default function (options) {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (canPlayHls() && options.enableHls !== false) {
|
if (canPlayHls() && options.enableHls !== false) {
|
||||||
let enableFmp4Hls = userSettings.preferFmp4HlsContainer();
|
|
||||||
if ((browser.safari || browser.tizen || browser.web0s) && !canPlayNativeHlsInFmp4()) {
|
|
||||||
enableFmp4Hls = false;
|
|
||||||
}
|
|
||||||
if (hlsInFmp4VideoCodecs.length && hlsInFmp4VideoAudioCodecs.length && enableFmp4Hls) {
|
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
|
// 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'}
|
// FIXME: Need support for {Container: 'mp4', Protocol: 'hls'} or {Container: 'hls', SubContainer: 'mp4'}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue