复用官方 OpenIMLive 信令与房间,换票改走账号服务 /api/rtc_token;入口仅音频,占线/超时/重复回调与销毁释放由公司层防护。 Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: multica-agent <github@multica.ai>
22 lines
769 B
Dart
22 lines
769 B
Dart
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;
|
|
}
|