feat(video): recover camera previews and reduce encoding and playout cost

Improve camera recovery, shared preview lifecycle and receiver playout diagnostics. Preserve qualified X4 runtime changes and restore async admission in loopback media tests.
This commit is contained in:
DCCONSTRUCTIONS
2026-10-29 09:10:01 +03:00
parent e06ff9a214
commit fa8bde584f
94 changed files with 8892 additions and 375 deletions
@@ -22,3 +22,10 @@ export function startCameraObservation(device:Sensor,transport:SensorTransport){
await perform(transport,current,'start',{record:false});
});
}
/** A new peer requires fresh control state; an established peer uses media liveness. */
export async function currentPreviewDevice(device:Sensor,transport:SensorTransport):Promise<Sensor>{
const current=await currentObservationDevice(device,transport);
if(current.snapshot.acquisition!=='streaming')throw new Error('Просмотр остановлен.');
return current;
}