SHA256
Add MVP call signaling API and browser call flow
This commit is contained in:
@@ -2,6 +2,7 @@ import { navigate, getRoute, PRE_AUTH_PAGES } from './router.js';
|
||||
import { renderToolbar } from './components/toolbar.js';
|
||||
import { captureClientError, setClientErrorTransport } from './services/client-error-reporter.js';
|
||||
import { initPwaPush } from './services/pwa-push-service.js';
|
||||
import { handleIncomingCallInvite, handleIncomingCallSignal } from './services/call-service.js';
|
||||
import {
|
||||
authService,
|
||||
authorizeSession,
|
||||
@@ -223,6 +224,15 @@ async function init() {
|
||||
try { await authService.ackIncomingMessage(eventId, messageId); } catch {}
|
||||
}
|
||||
});
|
||||
|
||||
authService.onEvent('IncomingCallInvite', async (evt) => {
|
||||
try { await handleIncomingCallInvite(evt); } catch {}
|
||||
});
|
||||
|
||||
authService.onEvent('IncomingCallSignal', async (evt) => {
|
||||
try { await handleIncomingCallSignal(evt); } catch {}
|
||||
});
|
||||
|
||||
await tryAutoLogin();
|
||||
if (state.session.isAuthorized) {
|
||||
await initPwaPush({ authService });
|
||||
|
||||
Reference in New Issue
Block a user