mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
firefox hls fixes
Conflicts: MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/.bower.json MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js
This commit is contained in:
parent
924548c761
commit
d96250df7f
8 changed files with 55 additions and 53 deletions
|
@ -29,7 +29,7 @@
|
|||
list.push('h264');
|
||||
}
|
||||
|
||||
if (document.createElement('audio').canPlayType('audio/aac').replace(/no/, '')) {
|
||||
if (document.createElement('audio').canPlayType('audio/aac').replace(/no/, '') || browser.firefox) {
|
||||
list.push('aac');
|
||||
}
|
||||
|
||||
|
@ -103,12 +103,33 @@
|
|||
|
||||
profile.DirectPlayProfiles = [];
|
||||
|
||||
var videoAudioCodecs = [];
|
||||
|
||||
// Only put mp3 first if mkv support is there
|
||||
// Otherwise with HLS and mp3 audio we're seeing some browsers
|
||||
if (canPlayMkv) {
|
||||
if (canPlayMp3) {
|
||||
videoAudioCodecs.push('mp3');
|
||||
}
|
||||
}
|
||||
if (canPlayAac) {
|
||||
videoAudioCodecs.push('aac');
|
||||
}
|
||||
if (!canPlayMkv) {
|
||||
if (canPlayMp3) {
|
||||
videoAudioCodecs.push('mp3');
|
||||
}
|
||||
}
|
||||
if (canPlayAc3) {
|
||||
videoAudioCodecs.push('ac3');
|
||||
}
|
||||
|
||||
if (supportedFormats.indexOf('h264') != -1) {
|
||||
profile.DirectPlayProfiles.push({
|
||||
Container: 'mp4,m4v',
|
||||
Type: 'Video',
|
||||
VideoCodec: 'h264',
|
||||
AudioCodec: 'aac' + (canPlayMp3 ? ',mp3' : '') + (canPlayAc3 ? ',ac3' : '')
|
||||
AudioCodec: videoAudioCodecs.join(',')
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -117,7 +138,7 @@
|
|||
Container: 'mkv,mov',
|
||||
Type: 'Video',
|
||||
VideoCodec: 'h264',
|
||||
AudioCodec: 'aac' + (canPlayMp3 ? ',mp3' : '') + (canPlayAc3 ? ',ac3' : '')
|
||||
AudioCodec: videoAudioCodecs.join(',')
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -160,17 +181,6 @@
|
|||
}
|
||||
});
|
||||
|
||||
var videoAudioCodecs = [];
|
||||
if (canPlayMp3) {
|
||||
videoAudioCodecs.push('mp3');
|
||||
}
|
||||
if (canPlayAac) {
|
||||
videoAudioCodecs.push('aac');
|
||||
}
|
||||
if (canPlayAc3) {
|
||||
videoAudioCodecs.push('ac3');
|
||||
}
|
||||
|
||||
// Can't use mkv on mobile because we have to use the native player controls and they won't be able to seek it
|
||||
if (canPlayMkv && !browser.mobile) {
|
||||
profile.TranscodingProfiles.push({
|
||||
|
@ -235,7 +245,7 @@
|
|||
}]
|
||||
});
|
||||
|
||||
var videoAudioChannels = browser.safari ? '2' : '6';
|
||||
var videoAudioChannels = '6';
|
||||
|
||||
profile.CodecProfiles.push({
|
||||
Type: 'VideoAudio',
|
||||
|
@ -268,24 +278,6 @@
|
|||
]
|
||||
});
|
||||
|
||||
profile.CodecProfiles.push({
|
||||
Type: 'VideoAudio',
|
||||
Codec: 'aac,mp3',
|
||||
Conditions: [
|
||||
{
|
||||
Condition: 'LessThanEqual',
|
||||
Property: 'AudioChannels',
|
||||
Value: videoAudioChannels
|
||||
},
|
||||
{
|
||||
Condition: 'Equals',
|
||||
Property: 'IsSecondaryAudio',
|
||||
Value: 'false',
|
||||
IsRequired: 'false'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
profile.CodecProfiles.push({
|
||||
Type: 'VideoAudio',
|
||||
Conditions: [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue