This commit is contained in:
Your Name
2026-03-20 13:56:40 +08:00
parent 7147c8e148
commit d765517b74
258 changed files with 2481 additions and 364 deletions
@@ -175,9 +175,17 @@ export default class EngineEventHandler {
TUIStore.update(StoreName.CALL, NAME.CALL_TIPS, { text: 'answered', duration: 2000 });
await this._callService.openMicrophone();
console.log(`${NAME.PREFIX}accept event data: ${JSON.stringify(event)}.`);
// 通知聊天页:视频/语音通话已接通,可关闭等待计时器
try {
uni.$emit('TUICall:callStart', event);
} catch (_) {}
}
private async _handleUserEnter(event: any): Promise<void> {
const { userID: userId, data } = analyzeEventData(event);
// 对方进入房间,通话已接通,通知聊天页关闭等待计时器
try {
uni.$emit('TUICall:callStart', event);
} catch (_) {}
if (userId && TUIStore.getData(StoreName.CALL, NAME.CALL_ROLE === CallRole.CALLEE)) {
if (TUIStore.getData(StoreName.CALL, NAME.CALL_STATUS) === CallStatus.CALLING) {
@@ -232,6 +240,10 @@ export default class EngineEventHandler {
private _handleCallingEnd(event: any): void {
console.log(`${NAME.PREFIX}callEnd event data: ${JSON.stringify(event)}.`);
this._callService?._resetCallStore();
// 通知聊天页等:视频通话已结束,可关闭等待计时器等
try {
uni.$emit('TUICall:callEnd', event);
} catch (_) {}
}
private _handleKickedOut(event: any): void {
console.log(`${NAME.PREFIX}kickOut event data: ${JSON.stringify(event)}.`);