mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix loss of audio
This commit is contained in:
parent
e81e43a19d
commit
17fc9c418d
2 changed files with 26 additions and 15 deletions
|
@ -205,7 +205,7 @@ define(['browser'], function (browser) {
|
||||||
function getMaxBitrate() {
|
function getMaxBitrate() {
|
||||||
|
|
||||||
if (browser.edgeUwp) {
|
if (browser.edgeUwp) {
|
||||||
return 30000000;
|
return 32000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 10mbps
|
// 10mbps
|
||||||
|
@ -264,7 +264,6 @@ define(['browser'], function (browser) {
|
||||||
// Otherwise with HLS and mp3 audio we're seeing some browsers
|
// Otherwise with HLS and mp3 audio we're seeing some browsers
|
||||||
// safari is lying
|
// safari is lying
|
||||||
if ((videoTestElement.canPlayType('audio/mp4; codecs="ac-3"').replace(/no/, '') && !browser.safari) || browser.edgeUwp || browser.tizen) {
|
if ((videoTestElement.canPlayType('audio/mp4; codecs="ac-3"').replace(/no/, '') && !browser.safari) || browser.edgeUwp || browser.tizen) {
|
||||||
if ((options.disableVideoAudioCodecs || []).indexOf('ac3') === -1) {
|
|
||||||
videoAudioCodecs.push('ac3');
|
videoAudioCodecs.push('ac3');
|
||||||
|
|
||||||
// This works in edge desktop, but not mobile
|
// This works in edge desktop, but not mobile
|
||||||
|
@ -273,7 +272,6 @@ define(['browser'], function (browser) {
|
||||||
hlsVideoAudioCodecs.push('ac3');
|
hlsVideoAudioCodecs.push('ac3');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
var mp3Added = false;
|
var mp3Added = false;
|
||||||
if (canPlayMkv) {
|
if (canPlayMkv) {
|
||||||
|
@ -302,6 +300,14 @@ define(['browser'], function (browser) {
|
||||||
//videoAudioCodecs.push('truehd');
|
//videoAudioCodecs.push('truehd');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
videoAudioCodecs = videoAudioCodecs.filter(function(c) {
|
||||||
|
return (options.disableVideoAudioCodecs || []).indexOf(c) === -1;
|
||||||
|
});
|
||||||
|
|
||||||
|
hlsVideoAudioCodecs = hlsVideoAudioCodecs.filter(function (c) {
|
||||||
|
return (options.disableHlsVideoAudioCodecs || []).indexOf(c) === -1;
|
||||||
|
});
|
||||||
|
|
||||||
var mp4VideoCodecs = [];
|
var mp4VideoCodecs = [];
|
||||||
if (canPlayH264()) {
|
if (canPlayH264()) {
|
||||||
mp4VideoCodecs.push('h264');
|
mp4VideoCodecs.push('h264');
|
||||||
|
|
|
@ -148,14 +148,20 @@ define(['appSettings', 'userSettings', 'appStorage', 'datetime'], function (appS
|
||||||
|
|
||||||
function getProfileOptions(item) {
|
function getProfileOptions(item) {
|
||||||
|
|
||||||
var disableVideoAudioCodecs = [];
|
|
||||||
if (!AppInfo.isNativeApp && !item.RunTimeTicks) {
|
|
||||||
disableVideoAudioCodecs.push('ac3');
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = {};
|
var options = {};
|
||||||
|
|
||||||
if (!AppInfo.isNativeApp) {
|
if (!AppInfo.isNativeApp) {
|
||||||
|
var disableHlsVideoAudioCodecs = [];
|
||||||
|
|
||||||
|
if (!self.canPlayNativeHls()) {
|
||||||
|
// hls.js does not support this
|
||||||
|
disableHlsVideoAudioCodecs.push('mp3');
|
||||||
|
}
|
||||||
|
if (!item.RunTimeTicks) {
|
||||||
|
// hls.js does not support this
|
||||||
|
disableHlsVideoAudioCodecs.push('ac3');
|
||||||
|
}
|
||||||
|
|
||||||
options.enableMkvProgressive = item.RunTimeTicks != null;
|
options.enableMkvProgressive = item.RunTimeTicks != null;
|
||||||
|
|
||||||
if (item.RunTimeTicks == null) {
|
if (item.RunTimeTicks == null) {
|
||||||
|
@ -163,9 +169,8 @@ define(['appSettings', 'userSettings', 'appStorage', 'datetime'], function (appS
|
||||||
}
|
}
|
||||||
|
|
||||||
options.enableMkvProgressive = false;
|
options.enableMkvProgressive = false;
|
||||||
options.disableVideoAudioCodecs = disableVideoAudioCodecs;
|
options.disableHlsVideoAudioCodecs = disableHlsVideoAudioCodecs;
|
||||||
}
|
}
|
||||||
|
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue