mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update audio channels
This commit is contained in:
parent
378cb21558
commit
d22c983370
1 changed files with 19 additions and 7 deletions
|
@ -76,12 +76,24 @@
|
||||||
|
|
||||||
profile.DirectPlayProfiles = [];
|
profile.DirectPlayProfiles = [];
|
||||||
|
|
||||||
|
var videoAudioCodecs = [];
|
||||||
|
// Putting mp3 first is really just a hack to ensure we transcode to 2 channels
|
||||||
|
if (canPlayMp3) {
|
||||||
|
videoAudioCodecs.push('mp3');
|
||||||
|
}
|
||||||
|
if (canPlayAac) {
|
||||||
|
videoAudioCodecs.push('aac');
|
||||||
|
}
|
||||||
|
if (canPlayAc3) {
|
||||||
|
videoAudioCodecs.push('ac3');
|
||||||
|
}
|
||||||
|
|
||||||
if (supportedFormats.indexOf('h264') != -1) {
|
if (supportedFormats.indexOf('h264') != -1) {
|
||||||
profile.DirectPlayProfiles.push({
|
profile.DirectPlayProfiles.push({
|
||||||
Container: 'mp4,m4v',
|
Container: 'mp4,m4v',
|
||||||
Type: 'Video',
|
Type: 'Video',
|
||||||
VideoCodec: 'h264',
|
VideoCodec: 'h264',
|
||||||
AudioCodec: 'aac' + (canPlayMp3 ? ',mp3' : '') + (canPlayAc3 ? ',ac3' : '')
|
AudioCodec: videoAudioCodecs.join(',')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +102,7 @@
|
||||||
Container: 'mkv,mov',
|
Container: 'mkv,mov',
|
||||||
Type: 'Video',
|
Type: 'Video',
|
||||||
VideoCodec: 'h264',
|
VideoCodec: 'h264',
|
||||||
AudioCodec: 'aac' + (canPlayMp3 ? ',mp3' : '') + (canPlayAc3 ? ',ac3' : '')
|
AudioCodec: videoAudioCodecs.join(',')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,7 +148,7 @@
|
||||||
profile.TranscodingProfiles.push({
|
profile.TranscodingProfiles.push({
|
||||||
Container: 'mkv',
|
Container: 'mkv',
|
||||||
Type: 'Video',
|
Type: 'Video',
|
||||||
AudioCodec: 'aac' + (canPlayAc3 ? ',ac3' : '') + (canPlayMp3 ? ',mp3' : ''),
|
AudioCodec: videoAudioCodecs.join(','),
|
||||||
VideoCodec: 'h264',
|
VideoCodec: 'h264',
|
||||||
Context: 'Streaming'
|
Context: 'Streaming'
|
||||||
});
|
});
|
||||||
|
@ -146,7 +158,7 @@
|
||||||
profile.TranscodingProfiles.push({
|
profile.TranscodingProfiles.push({
|
||||||
Container: 'ts',
|
Container: 'ts',
|
||||||
Type: 'Video',
|
Type: 'Video',
|
||||||
AudioCodec: 'aac' + (canPlayAc3 ? ',ac3' : ''),
|
AudioCodec: videoAudioCodecs.join(','),
|
||||||
VideoCodec: 'h264',
|
VideoCodec: 'h264',
|
||||||
Context: 'Streaming',
|
Context: 'Streaming',
|
||||||
Protocol: 'hls'
|
Protocol: 'hls'
|
||||||
|
@ -178,7 +190,7 @@
|
||||||
profile.TranscodingProfiles.push({
|
profile.TranscodingProfiles.push({
|
||||||
Container: 'mp4',
|
Container: 'mp4',
|
||||||
Type: 'Video',
|
Type: 'Video',
|
||||||
AudioCodec: 'aac',
|
AudioCodec: videoAudioCodecs.join(','),
|
||||||
VideoCodec: 'h264',
|
VideoCodec: 'h264',
|
||||||
Context: 'Streaming',
|
Context: 'Streaming',
|
||||||
Protocol: 'http'
|
Protocol: 'http'
|
||||||
|
@ -187,7 +199,7 @@
|
||||||
profile.TranscodingProfiles.push({
|
profile.TranscodingProfiles.push({
|
||||||
Container: 'mp4',
|
Container: 'mp4',
|
||||||
Type: 'Video',
|
Type: 'Video',
|
||||||
AudioCodec: 'aac',
|
AudioCodec: videoAudioCodecs.join(','),
|
||||||
VideoCodec: 'h264',
|
VideoCodec: 'h264',
|
||||||
Context: 'Static',
|
Context: 'Static',
|
||||||
Protocol: 'http'
|
Protocol: 'http'
|
||||||
|
@ -253,7 +265,7 @@
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
var videoAudioChannels = browserInfo.safari ? '2' : '6';
|
var videoAudioChannels = '6';
|
||||||
|
|
||||||
profile.CodecProfiles.push({
|
profile.CodecProfiles.push({
|
||||||
Type: 'VideoAudio',
|
Type: 'VideoAudio',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue