feat(mobile-next): 迁移 Android 一对一语音通话薄适配与入口
复用官方 OpenIMLive 信令与房间,换票改走账号服务 /api/rtc_token;入口仅音频,占线/超时/重复回调与销毁释放由公司层防护。 Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
co-authored by
Cursor
multica-agent
parent
2a817e77d8
commit
3832e080c4
@@ -0,0 +1,21 @@
|
||||
import '../config/app_endpoints.dart';
|
||||
|
||||
/// Android 一对一语音通话配置门。入口只在配置齐全且本卡已落地时打开。
|
||||
class LiveKitCallConfig {
|
||||
LiveKitCallConfig._();
|
||||
|
||||
/// 公司账号服务换票路径,对应 account-service `POST /api/rtc_token`。
|
||||
static const String rtcTokenPath = '/api/rtc_token';
|
||||
|
||||
static const Duration inviteTimeout = Duration(seconds: 30);
|
||||
|
||||
/// 薄适配与构建验证通过后为 true;配置不齐时 [enabled] 仍为 false。
|
||||
static const bool shipped = true;
|
||||
|
||||
static bool get endpointsReady =>
|
||||
AppEndpoints.livekitUrl.startsWith('ws://') &&
|
||||
AppEndpoints.authApiBase.startsWith('http') &&
|
||||
rtcTokenPath == '/api/rtc_token';
|
||||
|
||||
static bool get enabled => shipped && endpointsReady;
|
||||
}
|
||||
Reference in New Issue
Block a user