@trtc/calls-uikit-react 4.4.0 → 4.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Components/components/common/UIKitModal/UIKitModal.tsx +250 -0
- package/src/Components/components/common/UIKitModal/UIKitModalState.ts +177 -0
- package/src/Components/components/common/UIKitModal/index.module.scss +176 -0
- package/src/Components/components/common/UIKitModal/index.ts +3 -0
- package/src/TUICallService/CallService/UIKitModal.ts +81 -0
- package/src/TUICallService/CallService/index.ts +7 -1
- package/src/TUICallService/const/index.ts +1 -0
- package/src/TUICallService/locales/en.ts +12 -0
- package/src/TUICallService/locales/ja_JP.ts +12 -0
- package/src/TUICallService/locales/zh-cn.ts +12 -0
- package/src/index.ts +1 -1
- package/tuicall-uikit-react.es.js +2115 -2012
- package/tuicall-uikit-react.umd.js +11 -11
- package/types/Components/components/common/UIKitModal/UIKitModal.d.ts +21 -0
- package/types/Components/components/common/UIKitModal/UIKitModalState.d.ts +27 -0
- package/types/Components/components/common/UIKitModal/index.d.ts +3 -0
- package/types/TUICallService/CallService/UIKitModal.d.ts +1 -0
- package/types/TUICallService/locales/en.d.ts +11 -0
- package/types/TUICallService/locales/ja_JP.d.ts +11 -0
- package/types/TUICallService/locales/zh-cn.d.ts +11 -0
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
// @ts-ignore
|
|
10
10
|
import { TUICallEngine } from '@trtc/call-engine-lite-js';
|
|
11
11
|
import { checkLocalMP3FileExists } from '../utils/index';
|
|
12
|
+
import { handleModalError } from './UIKitModal';
|
|
12
13
|
import { CallTips, t } from '../locales/index';
|
|
13
14
|
import { BellContext } from './bellContext';
|
|
14
15
|
import { avoidRepeatedCall } from '../utils/validate/index';
|
|
@@ -28,7 +29,7 @@ const TUIStore: ITUIStore = TuiStore.getInstance();
|
|
|
28
29
|
const uiDesign = UIDesign.getInstance();
|
|
29
30
|
uiDesign.setTUIStore(TUIStore);
|
|
30
31
|
const aiAssistant = AIAssistant.getInstance();
|
|
31
|
-
const version = '4.4.
|
|
32
|
+
const version = '4.4.2';
|
|
32
33
|
const frameWork = 'react';
|
|
33
34
|
export { TUIGlobal, TUIStore, uiDesign };
|
|
34
35
|
|
|
@@ -195,6 +196,7 @@ export default class TUICallService {
|
|
|
195
196
|
const response = await this._tuiCallEngine.calls(callsParams);
|
|
196
197
|
await this._updateCallStoreAfterCall(userIDList, response);
|
|
197
198
|
} catch (error: any) {
|
|
199
|
+
handleModalError(error);
|
|
198
200
|
this._handleCallError(error, 'calls');
|
|
199
201
|
}
|
|
200
202
|
}
|
|
@@ -229,6 +231,7 @@ export default class TUICallService {
|
|
|
229
231
|
// setLocalUserInfoAudioVideoAvailable(true, NAME.VIDEO);
|
|
230
232
|
// }
|
|
231
233
|
} catch (error) {
|
|
234
|
+
handleModalError(error);
|
|
232
235
|
this._handleCallError(error, 'join');
|
|
233
236
|
}
|
|
234
237
|
}
|
|
@@ -360,6 +363,7 @@ export default class TUICallService {
|
|
|
360
363
|
error,
|
|
361
364
|
});
|
|
362
365
|
if (handleRepeatedCallError(error)) return;
|
|
366
|
+
handleModalError(error);
|
|
363
367
|
noDevicePermissionToast(error, CallMediaType.AUDIO, this._tuiCallEngine);
|
|
364
368
|
this._resetCallStore();
|
|
365
369
|
}
|
|
@@ -375,6 +379,7 @@ export default class TUICallService {
|
|
|
375
379
|
}
|
|
376
380
|
});
|
|
377
381
|
} catch (error) {
|
|
382
|
+
handleModalError(error);
|
|
378
383
|
console.debug(error);
|
|
379
384
|
}
|
|
380
385
|
this._resetCallStore();
|
|
@@ -388,6 +393,7 @@ export default class TUICallService {
|
|
|
388
393
|
this._chatCombine?.callTUIService({ message: response?.data?.message });
|
|
389
394
|
}
|
|
390
395
|
} catch (error) {
|
|
396
|
+
handleModalError(error);
|
|
391
397
|
console.debug(error);
|
|
392
398
|
}
|
|
393
399
|
this._resetCallStore();
|
|
@@ -134,4 +134,16 @@ export const en = {
|
|
|
134
134
|
'accept-error': 'Accept failed',
|
|
135
135
|
'accept-device-error': 'Accept failed, unable to auth calling device',
|
|
136
136
|
'call-error': 'Start call failed',
|
|
137
|
+
// 错误提示
|
|
138
|
+
'error.10001': "Your application has not enabled audio/video call (TUICallKit) capability. For first-time use, you can go to <a href='https://cloud.tencent.com/document/product/647/104662'>Enable Service</a> to apply for a free trial, or purchase call capability packages: <a href='https://console.cloud.tencent.com/trtc'>Purchase Page</a>",
|
|
139
|
+
'error.10002': "You do not currently support using this capability. Please go to the <a href='https://buy.cloud.tencent.com/avc?addRavLicense=1&position=1600110000&ravLicenseType=1®ionId=1'>purchase page</a> to buy and activate it",
|
|
140
|
+
'error.10004': "Camera/microphone permission was denied. Please check browser settings to ensure camera and microphone access is allowed. If you have confirmed permission is granted, please go to <a href='https://web.sdk.qcloud.com/trtc/webrtc/demo/detect/index.html'>Audio/Video Capability Detection</a> to check if your device and environment support calls",
|
|
141
|
+
'error.10005': "No microphone device detected. Please ensure your device has a microphone connected and check if the microphone is available in system or browser settings.",
|
|
142
|
+
'error.10006': "No camera device detected. Please ensure your camera is connected and check if the camera is available in system or browser settings.",
|
|
143
|
+
'error.10007': "Current browser environment does not support WebRTC functionality. Please go to <a href='https://web.sdk.qcloud.com/trtc/webrtc/demo/detect/index.html'>Audio/Video Capability Detection</a> to check your device and environment compatibility",
|
|
144
|
+
'error.10008': "TUICallEngine has not completed initialization or login. Please ensure you have successfully executed init or login operations before calling this function. Solution: <a href='https://cloud.tencent.com/document/product/647/78769#3a61f42b-e06f-49af-88bf-362d40025887'>View Documentation</a>",
|
|
145
|
+
'error.10012': "Detected that the current page is under HTTP protocol. To ensure smooth access and full functionality of TUICallEngine SDK for production environment users, please use HTTPS protocol (or localhost) to access the audio/video application page. For details, please visit: <a href='https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/tutorial-05-info-browser.html#h2-3'>View Documentation</a>",
|
|
146
|
+
'error.10013': "Call failed: You have been blocked by the other party or you have blocked the other party",
|
|
147
|
+
'error.10014': "Call initiation failed. User ID is invalid. Please confirm that the user is registered.",
|
|
148
|
+
'error': 'Error',
|
|
137
149
|
};
|
|
@@ -133,4 +133,16 @@ export const ja_JP = {
|
|
|
133
133
|
'accept-error': '接続できませんでした',
|
|
134
134
|
'accept-device-error': '接続できませんでした。発信側デバイスを認証できません',
|
|
135
135
|
'call-error': '通話が開始できませんでした',
|
|
136
|
+
// 错误提示
|
|
137
|
+
'error.10001': "あなたのアプリケーションは音声・ビデオ通話(TUICallKit)機能を有効にしていません。初めてご利用の場合、<a href='https://cloud.tencent.com/document/product/647/104662'>サービスを有効にする</a>で無料体験を申請するか、通話機能パッケージを購入してください:<a href='https://console.cloud.tencent.com/trtc'>購入ページ</a>",
|
|
138
|
+
'error.10002': "現在この機能を使用することはできません。<a href='https://buy.cloud.tencent.com/avc?addRavLicense=1&position=1600110000&ravLicenseType=1®ionId=1'>購入ページ</a>で購入して有効にしてください",
|
|
139
|
+
'error.10004': "カメラ/マイクのアクセス許可が拒否されました。ブラウザ設定を確認し、カメラとマイクの使用が許可されていることを確認してください。許可されている場合は、<a href='https://web.sdk.qcloud.com/trtc/webrtc/demo/detect/index.html'>音声・ビデオ機能検出</a>にアクセスして、お使いのデバイスと環境が通話をサポートしているか確認してください",
|
|
140
|
+
'error.10005': "マイクデバイスが検出されませんでした。デバイスにマイクが接続されていることを確認し、システムまたはブラウザ設定でマイクが利用可能かどうかを確認してください。",
|
|
141
|
+
'error.10006': "カメラデバイスが検出されませんでした。カメラが接続されていることを確認し、システムまたはブラウザ設定でカメラが利用可能かどうかを確認してください。",
|
|
142
|
+
'error.10007': "現在のブラウザ環境はWebRTC機能をサポートしていません。<a href='https://web.sdk.qcloud.com/trtc/webrtc/demo/detect/index.html'>音声・ビデオ機能検出</a>にアクセスして、お使いのデバイスと環境の互換性を確認してください",
|
|
143
|
+
'error.10008': "TUICallEngineが初期化またはログインを完了していません。この機能を呼び出す前に、initまたはlogin操作が正常に実行されていることを確認してください。解決策:<a href='https://cloud.tencent.com/document/product/647/78769#3a61f42b-e06f-49af-88bf-362d40025887'>ドキュメントを確認</a>",
|
|
144
|
+
'error.10012': "現在のページがHTTPプロトコル下にあることが検出されました。本番環境のユーザーがTUICallEngine SDKの全機能をスムーズに利用できるようにするため、音声・ビデオアプリケーションページにはHTTPSプロトコル(またはlocalhost)を使用してアクセスしてください。詳細については、<a href='https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/tutorial-05-info-browser.html#h2-3'>ドキュメントを確認</a>してください",
|
|
145
|
+
'error.10013': "通話失敗:相手にブロックされているか、または相手をブロックしています",
|
|
146
|
+
'error.10014': "通話の開始に失敗しました。ユーザーIDが無効です。ユーザーが登録されていることを確認してください。",
|
|
147
|
+
'error': 'エラー',
|
|
136
148
|
};
|
|
@@ -129,4 +129,16 @@ export const zh = {
|
|
|
129
129
|
'accept-error': '接通失败',
|
|
130
130
|
'accept-device-error': '接通失败,通话设备获取失败',
|
|
131
131
|
'call-error': '发起通话失败',
|
|
132
|
+
// 错误提示
|
|
133
|
+
'error.10001': "您的应用还未开通音视频通话(TUICallKit)能力,首次使用,您可以去<a href='https://cloud.tencent.com/document/product/647/104662'>开通服务</a>申请免费体验,或购买通话能力套餐包:<a href='https://console.cloud.tencent.com/trtc'>购买页面</a>",
|
|
134
|
+
'error.10002': "您暂不支持使用该能力,请前往<a href='https://buy.cloud.tencent.com/avc?addRavLicense=1&position=1600110000&ravLicenseType=1®ionId=1'>购买页</a>购买开通",
|
|
135
|
+
'error.10004': "摄像头/麦克风权限被拒绝,请检查浏览器设置,确保已允许使用您的摄像头和麦克风。如果您确认已授予权限,请前往<a href='https://web.sdk.qcloud.com/trtc/webrtc/demo/detect/index.html'>音视频能力检测</a>检查您的设备和环境是否支持通话",
|
|
136
|
+
'error.10005': "未检测到麦克风设备。请确保您的设备已连接麦克风,并检查系统或浏览器设置中麦克风是否可用。",
|
|
137
|
+
'error.10006': "未检测到摄像头设备。请确保您的摄像头已连接,并检查系统或浏览器设置中摄像头是否可用。",
|
|
138
|
+
'error.10007': "当前浏览器环境不支持 WebRTC 功能。请前往<a href='https://web.sdk.qcloud.com/trtc/webrtc/demo/detect/index.html'>音视频能力检测</a>检查您的设备和环境兼容性",
|
|
139
|
+
'error.10008': "TUICallEngine 尚未完成初始化或登录。请确保在调用此功能前,已成功执行 init 或 login 操作。解决方案:<a href='https://cloud.tencent.com/document/product/647/78769#3a61f42b-e06f-49af-88bf-362d40025887'>查看文档</a>",
|
|
140
|
+
'error.10012': "检测到当前页面正处于 http 协议下,为确保生产环境用户顺畅接入和体验 TUICallEngine SDK 的全部功能,请使用 https 协议(或 localhost)访问音视频应用页面。详情请前往:<a href='https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/tutorial-05-info-browser.html#h2-3'>查看文档</a>",
|
|
141
|
+
'error.10013': "呼叫失败:您已被对方拉黑或您拉黑了对方",
|
|
142
|
+
'error.10014': "发起通话失败,用户 ID 无效,请确认该用户已注册。",
|
|
143
|
+
'error': '错误',
|
|
132
144
|
};
|