mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add setting for preferred video codec
This commit is contained in:
parent
ef6bbc8212
commit
b234888485
5 changed files with 42 additions and 0 deletions
|
@ -70,6 +70,21 @@ function getDeviceProfile(item) {
|
|||
});
|
||||
}
|
||||
|
||||
const preferredTranscodeVideoCodec = appSettings.preferredTranscodeVideoCodec();
|
||||
if (preferredTranscodeVideoCodec) {
|
||||
profile.TranscodingProfiles.forEach((transcodingProfile) => {
|
||||
if (transcodingProfile.Type === 'Video') {
|
||||
const videoCodecs = transcodingProfile.VideoCodec.split(',');
|
||||
const index = videoCodecs.indexOf(preferredTranscodeVideoCodec);
|
||||
if (index !== -1) {
|
||||
videoCodecs.splice(index, 1);
|
||||
videoCodecs.unshift(preferredTranscodeVideoCodec);
|
||||
transcodingProfile.VideoCodec = videoCodecs.join(',');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const preferredTranscodeVideoAudioCodec = appSettings.preferredTranscodeVideoAudioCodec();
|
||||
if (preferredTranscodeVideoAudioCodec) {
|
||||
profile.TranscodingProfiles.forEach((transcodingProfile) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue