mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
merge main f13c60c into feat/voice-outlines
reconcile voice outlines with main f13c60c, retaining German/Japanese,
Operator HUD retirement and Context/Radio cleanup, named-building
containment, courtyard-hole, non-Latin identity, attribution, cancellation
and antimeridian repairs
keep outline callouts above the open voice preview when an above-panel
slot fits without colliding with another callout,
and clip the compact dock location label on narrow screens
This commit is contained in:
commit
578ebdc030
449 files changed
+30400
-3429
No files matched your search
@@ -53,6 +53,10 @@ function browser(t) {
|
||||
test('retained peer and channel callbacks cannot act after stop or enter a replacement session', async (t) => {
|
||||
const { peers, streams } = browser(t);
|
||||
const actions = [];
|
||||
const remote = () => {
|
||||
const track = { stops: 0, readyState: 'live', stop() { this.stops++; this.readyState = 'ended'; } };
|
||||
return { getTracks: () => [track], track };
|
||||
};
|
||||
const controller = new GevRealtimeController({
|
||||
runner: async (name) => { actions.push(name); return { ok: true }; },
|
||||
backend: {
|
||||
@@ -66,28 +70,38 @@ test('retained peer and channel callbacks cannot act after stop or enter a repla
|
||||
const old = peers[0];
|
||||
old.channel.handlers.get('open')();
|
||||
assert.equal(controller.status, 'listening');
|
||||
const oldAudio = controller.audioEl;
|
||||
const oldRemote = remote();
|
||||
old.ontrack({ streams: [oldRemote] });
|
||||
const message = { data: JSON.stringify({ type: 'response.function_call_arguments.done', name: 'get_entity_context', call_id: 'stale', arguments: '{}' }) };
|
||||
controller.stop();
|
||||
assert.equal(oldRemote.track.stops, 1, 'Stop releases its owned remote track');
|
||||
assert.equal(oldRemote.track.readyState, 'ended');
|
||||
assert.equal(oldAudio.srcObject, null);
|
||||
assert.doesNotThrow(() => old.ontrack({ streams: [{}] }));
|
||||
await old.channel.handlers.get('message')(message);
|
||||
await controller.start();
|
||||
const current = peers[1];
|
||||
current.channel.handlers.get('open')();
|
||||
const audio = controller.audioEl;
|
||||
const incoming = remote();
|
||||
current.ontrack({ streams: [incoming] });
|
||||
old.channel.readyState = 'open'; // Model an already queued callback from the old transport.
|
||||
old.channel.handlers.get('open')();
|
||||
await old.channel.handlers.get('message')(message);
|
||||
old.ontrack({ streams: [{}] });
|
||||
old.ontrack({ streams: [oldRemote] });
|
||||
old.onicecandidateerror({ errorText: 'stale error' });
|
||||
assert.equal(controller.status, 'listening');
|
||||
assert.equal(controller.pc, current);
|
||||
assert.equal(controller.audioEl, audio);
|
||||
assert.equal(audio.srcObject, undefined);
|
||||
assert.equal(audio.srcObject, incoming, 'a stale track cannot replace the current remote stream');
|
||||
assert.equal(incoming.track.stops, 0, 'a stale callback cannot stop the current remote track');
|
||||
assert.deepEqual(actions, []);
|
||||
const incoming = {};
|
||||
current.ontrack({ streams: [incoming] });
|
||||
assert.equal(audio.srcObject, incoming, 'the current peer still delivers audio');
|
||||
controller.stop();
|
||||
controller.stop();
|
||||
assert.equal(audio.srcObject, null);
|
||||
assert.deepEqual([oldRemote, incoming].map(s => s.track.stops), [1, 1], 'repeated Stop does not restop remote tracks');
|
||||
assert.equal(incoming.track.readyState, 'ended');
|
||||
assert.deepEqual(streams.map(s => s.track.stops), [1, 1]);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user