WIP III improve UX [snapshot task 2]
This commit is contained in:
1 parent
b2bab26981
commit
28c90d1d71
5 files changed
+97
-2
No files matched your search
@@ -219,7 +219,9 @@ function start() {
|
||||
if (['failed', 'closed'].includes(pc.connectionState)) {
|
||||
const unfinished = [sendState.value, receiveState.value].some(state => state && state !== 'done' && state !== 'closed');
|
||||
if (connected.value && !unfinished) disconnect();
|
||||
else fail(session, new Error('Connection failed. Unfinished files were cancelled. Direct connections may be blocked; TURN is available only if both people opt in.'));
|
||||
else fail(session, new Error(connected.value
|
||||
? 'Connection lost. Unfinished files were cancelled. Exchange fresh codes to reconnect.'
|
||||
: 'Could not establish the peer connection. Retry with fresh codes. If it fails again, copy Connection diagnostics from both devices.'));
|
||||
}
|
||||
};
|
||||
return session;
|
||||
@@ -245,6 +247,7 @@ async function createCode() {
|
||||
outputCode.value = code;
|
||||
session.diagnostics.record(props.sending ? 'offer ready' : 'answer ready');
|
||||
session.diagnostics.descriptions();
|
||||
void session.diagnostics.capture();
|
||||
if (!props.sending) fps.value = getFingerprints(session.pc, options);
|
||||
step.value = props.sending ? 'offer-ready' : 'answer-ready';
|
||||
} catch (err) {
|
||||
|
||||
Reference in new issue
Block a user