mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 10:58:20 -07:00
Backport pull request #4267 from jellyfin/release-10.8.z
Fix AudioContext limit exceeded
Original-merge: ea79d2651a
Merged-by: Bill Thornton <thornbill@users.noreply.github.com>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
parent
abed235b50
commit
7c9464d0c3
@ -283,16 +283,24 @@ import browser from './browser';
|
||||
return bitrate;
|
||||
}
|
||||
|
||||
let maxChannelCount = null;
|
||||
|
||||
function getSpeakerCount() {
|
||||
if (maxChannelCount != null) {
|
||||
return maxChannelCount;
|
||||
}
|
||||
|
||||
maxChannelCount = -1;
|
||||
|
||||
const AudioContext = window.AudioContext || window.webkitAudioContext || false; /* eslint-disable-line compat/compat */
|
||||
|
||||
if (AudioContext) {
|
||||
const audioCtx = new AudioContext();
|
||||
|
||||
return audioCtx.destination.maxChannelCount;
|
||||
maxChannelCount = audioCtx.destination.maxChannelCount;
|
||||
}
|
||||
|
||||
return -1;
|
||||
return maxChannelCount;
|
||||
}
|
||||
|
||||
function getPhysicalAudioChannels(options, videoTestElement) {
|
||||
|
Loading…
Reference in New Issue
Block a user