Fix stallDurations metadata buffer, add web=true, rebuild provider

- Increase camera metadata buffer from 2048 to 4096 bytes to prevent
  silent truncation of stallDurations (required by Android 16)
- Add web=true to module.prop for KernelSU WebUI detection
- Rebuilt virtual_camera_provider with buffer fix
- Updated WebUI JS with improved status display
- Bump version to 3.1
This commit is contained in:
2026-05-14 20:23:36 +02:00
parent ef0d17680f
commit 0e399ce02f
7 changed files with 70 additions and 29 deletions
+18 -2
View File
@@ -3,6 +3,18 @@ function log(m,t){const e=document.getElementById('console');const d=new Date();
e.innerHTML+=`<div class="${t||'log'}">[${d.toLocaleTimeString()}] ${m}</div>`;e.scrollTop=e.scrollHeight}
async function exec(c){try{return await KSU.exec(c)}catch(e){log('exec error','err');return null}}
async function loadConfig(){
const r=await exec(CMD+' get_config');if(!r)return;
try{const c=JSON.parse(r);
document.querySelector(`.src-btn[data-src="${c.source_type}"]`).click();
document.getElementById('rtsp-url').value=c.rtsp_url||'';
document.getElementById('mp4-path').value=c.mp4_path||'';
document.getElementById('res-w').value=c.res_w||1920;
document.getElementById('res-h').value=c.res_h||1080;
document.getElementById('fps').value=c.fps||30;
}catch(e){}
}
async function status(){
const r=await exec(CMD+' status');if(!r)return;
try{
@@ -18,6 +30,7 @@ async function status(){
}
document.addEventListener('DOMContentLoaded',()=>{
loadConfig();
status();
document.querySelectorAll('.src-btn').forEach(b=>{
b.addEventListener('click',()=>{
@@ -38,11 +51,14 @@ document.addEventListener('DOMContentLoaded',()=>{
log('Config saved','ok');
});
document.getElementById('btn-start').addEventListener('click',async()=>{
log('Starting provider...','info');await exec(CMD+' start');log('Provider started','ok');setTimeout(status,2000);
log('Starting provider...','info');await exec(CMD+' start');log('Provider started','ok');setTimeout(status,3000);
});
document.getElementById('btn-stop').addEventListener('click',async()=>{
log('Stopping...','info');await exec(CMD+' stop');log('Stopped','ok');status();
});
document.getElementById('btn-restart').addEventListener('click',async()=>{
log('Restarting provider...','info');await exec(CMD+' restart');log('Provider restarted','ok');setTimeout(status,3000);
});
document.getElementById('btn-feed').addEventListener('click',async()=>{
log('Starting feeder...','info');await exec(CMD+' start_feeder');log('Feeder started','ok');setTimeout(status,2000);
});
@@ -50,4 +66,4 @@ document.addEventListener('DOMContentLoaded',()=>{
log('Stopping feeder...','info');await exec(CMD+' stop_feeder');log('Feeder stopped','ok');status();
});
document.getElementById('btn-refresh').addEventListener('click',status);
});
});