fix: update innertube clients and fix HLS/DASH quality switching
All checks were successful
CI / test (push) Successful in 53s
All checks were successful
CI / test (push) Successful in 53s
- Update innertube client versions to match yt-dlp (android 21.02.35, ios 21.02.3, web 2.20260114.08.00, android_vr 1.65.10) - Remove obsolete clients (android-test-suite, ios_vr) - Replace tv_embedded with TVHTML5_SIMPLY (cn 75) - Add new clients: web_embedded, mweb, tv - Fix HLS freeze on quality switch: use nextLevel instead of currentLevel, handle bufferStalledError, stream proxy segments instead of buffering in memory - Populate DASH quality selector with actual sources (no Auto) - Render quality-select empty in template, let JS populate per mode
This commit is contained in:
@@ -31,9 +31,34 @@ if (data.using_pair_sources) {
|
||||
avMerge = new AVMerge(video, srcPair, 0);
|
||||
}
|
||||
|
||||
// Quality selector
|
||||
// Quality selector — populate with available sources
|
||||
const qs = document.getElementById('quality-select');
|
||||
if (qs) {
|
||||
// Clear the HLS-oriented "Auto" default; DASH has discrete sources
|
||||
qs.innerHTML = '';
|
||||
|
||||
// Add pair_sources (video+audio, used by AVMerge)
|
||||
if (data['pair_sources'] && data['pair_sources'].length) {
|
||||
data['pair_sources'].forEach(function(src, i) {
|
||||
let opt = document.createElement('option');
|
||||
opt.value = JSON.stringify({type: 'pair', index: i});
|
||||
opt.textContent = src.quality_string;
|
||||
if (i === data['pair_idx']) opt.selected = true;
|
||||
qs.appendChild(opt);
|
||||
});
|
||||
}
|
||||
|
||||
// Add uni_sources (integrated video+audio, single file)
|
||||
if (data['uni_sources'] && data['uni_sources'].length) {
|
||||
data['uni_sources'].forEach(function(src, i) {
|
||||
let opt = document.createElement('option');
|
||||
opt.value = JSON.stringify({type: 'uni', index: i});
|
||||
opt.textContent = src.quality_string;
|
||||
if (!data['pair_sources'].length && i === data['uni_idx']) opt.selected = true;
|
||||
qs.appendChild(opt);
|
||||
});
|
||||
}
|
||||
|
||||
qs.addEventListener('change', function(e) {
|
||||
changeQuality(JSON.parse(this.value))
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user