feat(CallFeature): implement call functionality and integrate WebSocket signaling
- Updated app.json to include microphone permissions and background audio support. - Added call-related dependencies in package.json and package-lock.json. - Enhanced ChatScreen to initiate calls and handle call actions. - Introduced call components in the layout for incoming call handling. - Expanded WebSocket service to manage call signaling messages and events. - Refactored authStore to initialize call state on user authentication.
This commit is contained in:
@@ -15,6 +15,7 @@ import { create } from 'zustand';
|
||||
import { User } from '../types';
|
||||
import { authService, resolveAuthApiError, LoginRequest, RegisterRequest } from '../services';
|
||||
import { wsService } from '../services/wsService';
|
||||
import { callStore } from './callStore';
|
||||
import {
|
||||
initDatabase,
|
||||
closeDatabase,
|
||||
@@ -96,6 +97,7 @@ function resolveLoginError(error: any): string {
|
||||
async function startRealtime(): Promise<void> {
|
||||
try {
|
||||
await wsService.start();
|
||||
callStore.getState().initCall();
|
||||
} catch (error) {
|
||||
console.error('[AuthStore] 启动 SSE 服务失败:', error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user