This commit is contained in:
Dominika Liberda 2021-05-31 23:11:41 +00:00
parent abaab8dcf0
commit f6905e241f

View file

@ -32,7 +32,7 @@ window.addEventListener('DOMContentLoaded', (event) => {
if (videoFormat == null) {
videoFormat = formats.find((fmt) => fmt.vcodec !== 'none');
}
const audioFormat = videoFormat.acodec === 'none' ? formats.find((fmt) => fmt.format_id == localStorage.getItem("audioStream")) : null;
let audioFormat = videoFormat.acodec === 'none' ? formats.find((fmt) => fmt.format_id == localStorage.getItem("audioStream")) : null;
if (audioFormat == null) {
audioFormat = videoFormat.acodec === 'none' ? formats.find((fmt) => fmt.acodec !== 'none') : null;
}