docs(webrtc_controller_flutter): 更新项目文档以反映重构后的架构
AGENTS.md 与 README.md 同步更新:根据实际代码结构重写目录树、技术栈、架构分层及编码规范,移除旧版内联示例并补充新的开发约定与代码生成命令。
This commit is contained in:
67
webrtc_controller_flutter/lib/l10n/app_en.arb
Normal file
67
webrtc_controller_flutter/lib/l10n/app_en.arb
Normal file
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"@@locale": "en",
|
||||
"appTitle": "WebRTC Controller",
|
||||
"login": "Login",
|
||||
"logout": "Logout",
|
||||
"cancel": "Cancel",
|
||||
"confirm": "OK",
|
||||
"connect": "Connect",
|
||||
"connecting": "Connecting...",
|
||||
"loginAccount": "Login Account",
|
||||
"connectDevice": "Connect Device",
|
||||
"serverUrl": "Signal Server URL:",
|
||||
"serverUrlPlaceholder": "wss://www.ttstd.com/signal",
|
||||
"deviceId": "Device ID (assigned by server):",
|
||||
"deviceIdPlaceholder": "Assigned by server",
|
||||
"targetDeviceId": "Target Device ID:",
|
||||
"targetDeviceIdPlaceholder": "Controlled device ID",
|
||||
"username": "Username",
|
||||
"password": "Password",
|
||||
"loginFailed": "Login failed: {error}",
|
||||
"usernamePasswordRequired": "Please enter username and password",
|
||||
"serverAndTargetRequired": "Please enter server URL and target device ID",
|
||||
"authTitle": "Connection Auth",
|
||||
"authNone": "Passwordless",
|
||||
"authNoneDesc": "Manual confirmation on the controlled device",
|
||||
"authCode": "Dynamic Code",
|
||||
"authCodeDesc": "Use a one-time dynamic code",
|
||||
"authPassword": "Fixed Password",
|
||||
"authPasswordDesc": "Use a fixed connection password",
|
||||
"authNonePlaceholder": "No value needed",
|
||||
"authPasswordPlaceholder": "Enter fixed password",
|
||||
"authCodePlaceholder": "Enter dynamic code",
|
||||
"authValueRequired": "Please enter the code or password",
|
||||
"statusStopped": "Status: Stopped",
|
||||
"statusConnectingSignal": "Status: Connecting to signal server...",
|
||||
"statusConnected": "Status: Connected - remote control active",
|
||||
"statusDisconnected": "Status: Remote disconnected",
|
||||
"statusSignalConnected": "Status: Signal connected, waiting for registration...",
|
||||
"statusRegistered": "Status: Registered ({deviceId}), establishing...",
|
||||
"statusAuthFailed": "Status: Auth failed - {error}",
|
||||
"statusConnectError": "Status: Connection error - {error}",
|
||||
"statusTargetAccept": "Status: Target accepted, establishing connection...",
|
||||
"statusTokenRefreshFailed": "Status: Token refresh failed - {error}",
|
||||
"statusForceLogout": "Status: Account logged in elsewhere, force logged out",
|
||||
"connectedBindings": "Bound devices: {uids}",
|
||||
"resolutionSwitch": "Switch Resolution",
|
||||
"fpsSwitch": "Switch FPS",
|
||||
"selfCodec": "SelfCodec",
|
||||
"record": "Record",
|
||||
"stop": "Stop",
|
||||
"recording": "Recording...",
|
||||
"recordSaved": "Saved: {path}",
|
||||
"recordStopped": "Recording stopped",
|
||||
"recordNoStream": "Not connected or no video stream available",
|
||||
"recordSwitchToStd": "Switching back to standard mode to record...",
|
||||
"recordStartFailed": "Failed to start recording: {error}",
|
||||
"recordNoVideoTrack": "No remote video track received",
|
||||
"selfCodecNotSupported": "Self-codec hardware decoding is not supported on this platform, fell back to WebRTC media stream.",
|
||||
"iceDisconnected": "ICE connection disconnected",
|
||||
"targetOffline": "Target device is offline. Please confirm it is powered on and connected.",
|
||||
"connectionFailed": "Connection failed: {error}",
|
||||
"tokenExpired": "Session expired. Please login again.",
|
||||
"forceLogout": "Account logged in elsewhere, force logged out.",
|
||||
"loginFirst": "Please login before connecting",
|
||||
"pleaseFillAuth": "Please enter the code or password",
|
||||
"streamModeSelfCodecDesc": "Self-codec hardware decoding is not supported on this platform."
|
||||
}
|
||||
518
webrtc_controller_flutter/lib/l10n/app_localizations.dart
Normal file
518
webrtc_controller_flutter/lib/l10n/app_localizations.dart
Normal file
@@ -0,0 +1,518 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:intl/intl.dart' as intl;
|
||||
|
||||
import 'app_localizations_en.dart';
|
||||
import 'app_localizations_zh.dart';
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
|
||||
/// Callers can lookup localized strings with an instance of AppLocalizations
|
||||
/// returned by `AppLocalizations.of(context)`.
|
||||
///
|
||||
/// Applications need to include `AppLocalizations.delegate()` in their app's
|
||||
/// `localizationDelegates` list, and the locales they support in the app's
|
||||
/// `supportedLocales` list. For example:
|
||||
///
|
||||
/// ```dart
|
||||
/// import 'l10n/app_localizations.dart';
|
||||
///
|
||||
/// return MaterialApp(
|
||||
/// localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
/// supportedLocales: AppLocalizations.supportedLocales,
|
||||
/// home: MyApplicationHome(),
|
||||
/// );
|
||||
/// ```
|
||||
///
|
||||
/// ## Update pubspec.yaml
|
||||
///
|
||||
/// Please make sure to update your pubspec.yaml to include the following
|
||||
/// packages:
|
||||
///
|
||||
/// ```yaml
|
||||
/// dependencies:
|
||||
/// # Internationalization support.
|
||||
/// flutter_localizations:
|
||||
/// sdk: flutter
|
||||
/// intl: any # Use the pinned version from flutter_localizations
|
||||
///
|
||||
/// # Rest of dependencies
|
||||
/// ```
|
||||
///
|
||||
/// ## iOS Applications
|
||||
///
|
||||
/// iOS applications define key application metadata, including supported
|
||||
/// locales, in an Info.plist file that is built into the application bundle.
|
||||
/// To configure the locales supported by your app, you’ll need to edit this
|
||||
/// file.
|
||||
///
|
||||
/// First, open your project’s ios/Runner.xcworkspace Xcode workspace file.
|
||||
/// Then, in the Project Navigator, open the Info.plist file under the Runner
|
||||
/// project’s Runner folder.
|
||||
///
|
||||
/// Next, select the Information Property List item, select Add Item from the
|
||||
/// Editor menu, then select Localizations from the pop-up menu.
|
||||
///
|
||||
/// Select and expand the newly-created Localizations item then, for each
|
||||
/// locale your application supports, add a new item and select the locale
|
||||
/// you wish to add from the pop-up menu in the Value field. This list should
|
||||
/// be consistent with the languages listed in the AppLocalizations.supportedLocales
|
||||
/// property.
|
||||
abstract class AppLocalizations {
|
||||
AppLocalizations(String locale)
|
||||
: localeName = intl.Intl.canonicalizedLocale(locale.toString());
|
||||
|
||||
final String localeName;
|
||||
|
||||
static AppLocalizations of(BuildContext context) {
|
||||
return Localizations.of<AppLocalizations>(context, AppLocalizations)!;
|
||||
}
|
||||
|
||||
static const LocalizationsDelegate<AppLocalizations> delegate =
|
||||
_AppLocalizationsDelegate();
|
||||
|
||||
/// A list of this localizations delegate along with the default localizations
|
||||
/// delegates.
|
||||
///
|
||||
/// Returns a list of localizations delegates containing this delegate along with
|
||||
/// GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate,
|
||||
/// and GlobalWidgetsLocalizations.delegate.
|
||||
///
|
||||
/// Additional delegates can be added by appending to this list in
|
||||
/// MaterialApp. This list does not have to be used at all if a custom list
|
||||
/// of delegates is preferred or required.
|
||||
static const List<LocalizationsDelegate<dynamic>> localizationsDelegates =
|
||||
<LocalizationsDelegate<dynamic>>[
|
||||
delegate,
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
];
|
||||
|
||||
/// A list of this localizations delegate's supported locales.
|
||||
static const List<Locale> supportedLocales = <Locale>[
|
||||
Locale('en'),
|
||||
Locale('zh'),
|
||||
];
|
||||
|
||||
/// No description provided for @appTitle.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'WebRTC 控制端'**
|
||||
String get appTitle;
|
||||
|
||||
/// No description provided for @login.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'登录'**
|
||||
String get login;
|
||||
|
||||
/// No description provided for @logout.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'退出登录'**
|
||||
String get logout;
|
||||
|
||||
/// No description provided for @cancel.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'取消'**
|
||||
String get cancel;
|
||||
|
||||
/// No description provided for @confirm.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'确定'**
|
||||
String get confirm;
|
||||
|
||||
/// No description provided for @connect.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'连接'**
|
||||
String get connect;
|
||||
|
||||
/// No description provided for @connecting.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'正在连接...'**
|
||||
String get connecting;
|
||||
|
||||
/// No description provided for @loginAccount.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'登录账号'**
|
||||
String get loginAccount;
|
||||
|
||||
/// No description provided for @connectDevice.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'连接被控设备'**
|
||||
String get connectDevice;
|
||||
|
||||
/// No description provided for @serverUrl.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'信令服务器地址:'**
|
||||
String get serverUrl;
|
||||
|
||||
/// No description provided for @serverUrlPlaceholder.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'wss://www.ttstd.com/signal'**
|
||||
String get serverUrlPlaceholder;
|
||||
|
||||
/// No description provided for @deviceId.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'本机设备ID(连接后由服务端下发,无需填写):'**
|
||||
String get deviceId;
|
||||
|
||||
/// No description provided for @deviceIdPlaceholder.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'连接后由服务端下发'**
|
||||
String get deviceIdPlaceholder;
|
||||
|
||||
/// No description provided for @targetDeviceId.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'目标被控设备ID:'**
|
||||
String get targetDeviceId;
|
||||
|
||||
/// No description provided for @targetDeviceIdPlaceholder.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'被控端设备ID'**
|
||||
String get targetDeviceIdPlaceholder;
|
||||
|
||||
/// No description provided for @username.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'用户名'**
|
||||
String get username;
|
||||
|
||||
/// No description provided for @password.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'密码'**
|
||||
String get password;
|
||||
|
||||
/// No description provided for @loginFailed.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'登录失败:{error}'**
|
||||
String loginFailed(Object error);
|
||||
|
||||
/// No description provided for @usernamePasswordRequired.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'请输入用户名和密码'**
|
||||
String get usernamePasswordRequired;
|
||||
|
||||
/// No description provided for @serverAndTargetRequired.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'请填写服务器地址和目标设备ID'**
|
||||
String get serverAndTargetRequired;
|
||||
|
||||
/// No description provided for @authTitle.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'连接鉴权'**
|
||||
String get authTitle;
|
||||
|
||||
/// No description provided for @authNone.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'免密连接'**
|
||||
String get authNone;
|
||||
|
||||
/// No description provided for @authNoneDesc.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'被控端弹出手动确认框,无需验证码或密码'**
|
||||
String get authNoneDesc;
|
||||
|
||||
/// No description provided for @authCode.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'动态验证码'**
|
||||
String get authCode;
|
||||
|
||||
/// No description provided for @authCodeDesc.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'使用一次性动态验证码鉴权'**
|
||||
String get authCodeDesc;
|
||||
|
||||
/// No description provided for @authPassword.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'固定密码'**
|
||||
String get authPassword;
|
||||
|
||||
/// No description provided for @authPasswordDesc.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'使用固定连接密码鉴权'**
|
||||
String get authPasswordDesc;
|
||||
|
||||
/// No description provided for @authNonePlaceholder.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'免密连接,无需填写'**
|
||||
String get authNonePlaceholder;
|
||||
|
||||
/// No description provided for @authPasswordPlaceholder.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'请输入固定密码'**
|
||||
String get authPasswordPlaceholder;
|
||||
|
||||
/// No description provided for @authCodePlaceholder.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'请输入动态验证码'**
|
||||
String get authCodePlaceholder;
|
||||
|
||||
/// No description provided for @authValueRequired.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'请输入验证码或密码'**
|
||||
String get authValueRequired;
|
||||
|
||||
/// No description provided for @statusStopped.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'状态: 已停止'**
|
||||
String get statusStopped;
|
||||
|
||||
/// No description provided for @statusConnectingSignal.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'状态: 正在连接信令服务器...'**
|
||||
String get statusConnectingSignal;
|
||||
|
||||
/// No description provided for @statusConnected.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'状态: 已连接 - 远程控制中'**
|
||||
String get statusConnected;
|
||||
|
||||
/// No description provided for @statusDisconnected.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'状态: 远端已断开'**
|
||||
String get statusDisconnected;
|
||||
|
||||
/// No description provided for @statusSignalConnected.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'状态: 已连接信令服务器,等待注册...'**
|
||||
String get statusSignalConnected;
|
||||
|
||||
/// No description provided for @statusRegistered.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'状态: 已注册 ({deviceId}),正在发起连接...'**
|
||||
String statusRegistered(Object deviceId);
|
||||
|
||||
/// No description provided for @statusAuthFailed.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'状态: 认证失败 - {error}'**
|
||||
String statusAuthFailed(Object error);
|
||||
|
||||
/// No description provided for @statusConnectError.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'状态: 连接错误 - {error}'**
|
||||
String statusConnectError(Object error);
|
||||
|
||||
/// No description provided for @statusTargetAccept.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'状态: 被控端已接受连接,正在建立连接...'**
|
||||
String get statusTargetAccept;
|
||||
|
||||
/// No description provided for @statusTokenRefreshFailed.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'状态: 令牌刷新失败 - {error}'**
|
||||
String statusTokenRefreshFailed(Object error);
|
||||
|
||||
/// No description provided for @statusForceLogout.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'状态: 账号已在其他位置登录,已强制下线'**
|
||||
String get statusForceLogout;
|
||||
|
||||
/// No description provided for @connectedBindings.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'已绑定设备: {uids}'**
|
||||
String connectedBindings(Object uids);
|
||||
|
||||
/// No description provided for @resolutionSwitch.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'切换分辨率'**
|
||||
String get resolutionSwitch;
|
||||
|
||||
/// No description provided for @fpsSwitch.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'切换帧率'**
|
||||
String get fpsSwitch;
|
||||
|
||||
/// No description provided for @selfCodec.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'自编码'**
|
||||
String get selfCodec;
|
||||
|
||||
/// No description provided for @record.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'录制'**
|
||||
String get record;
|
||||
|
||||
/// No description provided for @stop.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'停止'**
|
||||
String get stop;
|
||||
|
||||
/// No description provided for @recording.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'录制中...'**
|
||||
String get recording;
|
||||
|
||||
/// No description provided for @recordSaved.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'已保存:{path}'**
|
||||
String recordSaved(Object path);
|
||||
|
||||
/// No description provided for @recordStopped.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'录制已停止'**
|
||||
String get recordStopped;
|
||||
|
||||
/// No description provided for @recordNoStream.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'尚未连接或没有视频画面,无法录制'**
|
||||
String get recordNoStream;
|
||||
|
||||
/// No description provided for @recordSwitchToStd.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'正在切回标准模式以开始录制...'**
|
||||
String get recordSwitchToStd;
|
||||
|
||||
/// No description provided for @recordStartFailed.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'开始录制失败:{error}'**
|
||||
String recordStartFailed(Object error);
|
||||
|
||||
/// No description provided for @recordNoVideoTrack.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'尚未接收到视频画面,无法录制'**
|
||||
String get recordNoVideoTrack;
|
||||
|
||||
/// No description provided for @selfCodecNotSupported.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'当前平台不支持自编码硬解,已回退到 WebRTC 媒体流。'**
|
||||
String get selfCodecNotSupported;
|
||||
|
||||
/// No description provided for @iceDisconnected.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'ICE 连接已断开'**
|
||||
String get iceDisconnected;
|
||||
|
||||
/// No description provided for @targetOffline.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'目标被控端不在线,请确认设备已开启并连接服务器'**
|
||||
String get targetOffline;
|
||||
|
||||
/// No description provided for @connectionFailed.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'连接失败:{error}'**
|
||||
String connectionFailed(Object error);
|
||||
|
||||
/// No description provided for @tokenExpired.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'登录已失效,请重新登录后再连接。'**
|
||||
String get tokenExpired;
|
||||
|
||||
/// No description provided for @forceLogout.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'账号已在其他位置登录,已强制下线。'**
|
||||
String get forceLogout;
|
||||
|
||||
/// No description provided for @loginFirst.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'请先登录后再连接'**
|
||||
String get loginFirst;
|
||||
|
||||
/// No description provided for @pleaseFillAuth.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'请输入验证码或密码'**
|
||||
String get pleaseFillAuth;
|
||||
|
||||
/// No description provided for @streamModeSelfCodecDesc.
|
||||
///
|
||||
/// In zh, this message translates to:
|
||||
/// **'当前平台不支持自编码硬解。'**
|
||||
String get streamModeSelfCodecDesc;
|
||||
}
|
||||
|
||||
class _AppLocalizationsDelegate
|
||||
extends LocalizationsDelegate<AppLocalizations> {
|
||||
const _AppLocalizationsDelegate();
|
||||
|
||||
@override
|
||||
Future<AppLocalizations> load(Locale locale) {
|
||||
return SynchronousFuture<AppLocalizations>(lookupAppLocalizations(locale));
|
||||
}
|
||||
|
||||
@override
|
||||
bool isSupported(Locale locale) =>
|
||||
<String>['en', 'zh'].contains(locale.languageCode);
|
||||
|
||||
@override
|
||||
bool shouldReload(_AppLocalizationsDelegate old) => false;
|
||||
}
|
||||
|
||||
AppLocalizations lookupAppLocalizations(Locale locale) {
|
||||
// Lookup logic when only language code is specified.
|
||||
switch (locale.languageCode) {
|
||||
case 'en':
|
||||
return AppLocalizationsEn();
|
||||
case 'zh':
|
||||
return AppLocalizationsZh();
|
||||
}
|
||||
|
||||
throw FlutterError(
|
||||
'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
|
||||
'an issue with the localizations generation tool. Please file an issue '
|
||||
'on GitHub with a reproducible sample app and the gen-l10n configuration '
|
||||
'that was used.',
|
||||
);
|
||||
}
|
||||
228
webrtc_controller_flutter/lib/l10n/app_localizations_en.dart
Normal file
228
webrtc_controller_flutter/lib/l10n/app_localizations_en.dart
Normal file
@@ -0,0 +1,228 @@
|
||||
// ignore: unused_import
|
||||
import 'package:intl/intl.dart' as intl;
|
||||
import 'app_localizations.dart';
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
|
||||
/// The translations for English (`en`).
|
||||
class AppLocalizationsEn extends AppLocalizations {
|
||||
AppLocalizationsEn([String locale = 'en']) : super(locale);
|
||||
|
||||
@override
|
||||
String get appTitle => 'WebRTC Controller';
|
||||
|
||||
@override
|
||||
String get login => 'Login';
|
||||
|
||||
@override
|
||||
String get logout => 'Logout';
|
||||
|
||||
@override
|
||||
String get cancel => 'Cancel';
|
||||
|
||||
@override
|
||||
String get confirm => 'OK';
|
||||
|
||||
@override
|
||||
String get connect => 'Connect';
|
||||
|
||||
@override
|
||||
String get connecting => 'Connecting...';
|
||||
|
||||
@override
|
||||
String get loginAccount => 'Login Account';
|
||||
|
||||
@override
|
||||
String get connectDevice => 'Connect Device';
|
||||
|
||||
@override
|
||||
String get serverUrl => 'Signal Server URL:';
|
||||
|
||||
@override
|
||||
String get serverUrlPlaceholder => 'wss://www.ttstd.com/signal';
|
||||
|
||||
@override
|
||||
String get deviceId => 'Device ID (assigned by server):';
|
||||
|
||||
@override
|
||||
String get deviceIdPlaceholder => 'Assigned by server';
|
||||
|
||||
@override
|
||||
String get targetDeviceId => 'Target Device ID:';
|
||||
|
||||
@override
|
||||
String get targetDeviceIdPlaceholder => 'Controlled device ID';
|
||||
|
||||
@override
|
||||
String get username => 'Username';
|
||||
|
||||
@override
|
||||
String get password => 'Password';
|
||||
|
||||
@override
|
||||
String loginFailed(Object error) {
|
||||
return 'Login failed: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get usernamePasswordRequired => 'Please enter username and password';
|
||||
|
||||
@override
|
||||
String get serverAndTargetRequired =>
|
||||
'Please enter server URL and target device ID';
|
||||
|
||||
@override
|
||||
String get authTitle => 'Connection Auth';
|
||||
|
||||
@override
|
||||
String get authNone => 'Passwordless';
|
||||
|
||||
@override
|
||||
String get authNoneDesc => 'Manual confirmation on the controlled device';
|
||||
|
||||
@override
|
||||
String get authCode => 'Dynamic Code';
|
||||
|
||||
@override
|
||||
String get authCodeDesc => 'Use a one-time dynamic code';
|
||||
|
||||
@override
|
||||
String get authPassword => 'Fixed Password';
|
||||
|
||||
@override
|
||||
String get authPasswordDesc => 'Use a fixed connection password';
|
||||
|
||||
@override
|
||||
String get authNonePlaceholder => 'No value needed';
|
||||
|
||||
@override
|
||||
String get authPasswordPlaceholder => 'Enter fixed password';
|
||||
|
||||
@override
|
||||
String get authCodePlaceholder => 'Enter dynamic code';
|
||||
|
||||
@override
|
||||
String get authValueRequired => 'Please enter the code or password';
|
||||
|
||||
@override
|
||||
String get statusStopped => 'Status: Stopped';
|
||||
|
||||
@override
|
||||
String get statusConnectingSignal => 'Status: Connecting to signal server...';
|
||||
|
||||
@override
|
||||
String get statusConnected => 'Status: Connected - remote control active';
|
||||
|
||||
@override
|
||||
String get statusDisconnected => 'Status: Remote disconnected';
|
||||
|
||||
@override
|
||||
String get statusSignalConnected =>
|
||||
'Status: Signal connected, waiting for registration...';
|
||||
|
||||
@override
|
||||
String statusRegistered(Object deviceId) {
|
||||
return 'Status: Registered ($deviceId), establishing...';
|
||||
}
|
||||
|
||||
@override
|
||||
String statusAuthFailed(Object error) {
|
||||
return 'Status: Auth failed - $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String statusConnectError(Object error) {
|
||||
return 'Status: Connection error - $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get statusTargetAccept =>
|
||||
'Status: Target accepted, establishing connection...';
|
||||
|
||||
@override
|
||||
String statusTokenRefreshFailed(Object error) {
|
||||
return 'Status: Token refresh failed - $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get statusForceLogout =>
|
||||
'Status: Account logged in elsewhere, force logged out';
|
||||
|
||||
@override
|
||||
String connectedBindings(Object uids) {
|
||||
return 'Bound devices: $uids';
|
||||
}
|
||||
|
||||
@override
|
||||
String get resolutionSwitch => 'Switch Resolution';
|
||||
|
||||
@override
|
||||
String get fpsSwitch => 'Switch FPS';
|
||||
|
||||
@override
|
||||
String get selfCodec => 'SelfCodec';
|
||||
|
||||
@override
|
||||
String get record => 'Record';
|
||||
|
||||
@override
|
||||
String get stop => 'Stop';
|
||||
|
||||
@override
|
||||
String get recording => 'Recording...';
|
||||
|
||||
@override
|
||||
String recordSaved(Object path) {
|
||||
return 'Saved: $path';
|
||||
}
|
||||
|
||||
@override
|
||||
String get recordStopped => 'Recording stopped';
|
||||
|
||||
@override
|
||||
String get recordNoStream => 'Not connected or no video stream available';
|
||||
|
||||
@override
|
||||
String get recordSwitchToStd =>
|
||||
'Switching back to standard mode to record...';
|
||||
|
||||
@override
|
||||
String recordStartFailed(Object error) {
|
||||
return 'Failed to start recording: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get recordNoVideoTrack => 'No remote video track received';
|
||||
|
||||
@override
|
||||
String get selfCodecNotSupported =>
|
||||
'Self-codec hardware decoding is not supported on this platform, fell back to WebRTC media stream.';
|
||||
|
||||
@override
|
||||
String get iceDisconnected => 'ICE connection disconnected';
|
||||
|
||||
@override
|
||||
String get targetOffline =>
|
||||
'Target device is offline. Please confirm it is powered on and connected.';
|
||||
|
||||
@override
|
||||
String connectionFailed(Object error) {
|
||||
return 'Connection failed: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get tokenExpired => 'Session expired. Please login again.';
|
||||
|
||||
@override
|
||||
String get forceLogout => 'Account logged in elsewhere, force logged out.';
|
||||
|
||||
@override
|
||||
String get loginFirst => 'Please login before connecting';
|
||||
|
||||
@override
|
||||
String get pleaseFillAuth => 'Please enter the code or password';
|
||||
|
||||
@override
|
||||
String get streamModeSelfCodecDesc =>
|
||||
'Self-codec hardware decoding is not supported on this platform.';
|
||||
}
|
||||
220
webrtc_controller_flutter/lib/l10n/app_localizations_zh.dart
Normal file
220
webrtc_controller_flutter/lib/l10n/app_localizations_zh.dart
Normal file
@@ -0,0 +1,220 @@
|
||||
// ignore: unused_import
|
||||
import 'package:intl/intl.dart' as intl;
|
||||
import 'app_localizations.dart';
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
|
||||
/// The translations for Chinese (`zh`).
|
||||
class AppLocalizationsZh extends AppLocalizations {
|
||||
AppLocalizationsZh([String locale = 'zh']) : super(locale);
|
||||
|
||||
@override
|
||||
String get appTitle => 'WebRTC 控制端';
|
||||
|
||||
@override
|
||||
String get login => '登录';
|
||||
|
||||
@override
|
||||
String get logout => '退出登录';
|
||||
|
||||
@override
|
||||
String get cancel => '取消';
|
||||
|
||||
@override
|
||||
String get confirm => '确定';
|
||||
|
||||
@override
|
||||
String get connect => '连接';
|
||||
|
||||
@override
|
||||
String get connecting => '正在连接...';
|
||||
|
||||
@override
|
||||
String get loginAccount => '登录账号';
|
||||
|
||||
@override
|
||||
String get connectDevice => '连接被控设备';
|
||||
|
||||
@override
|
||||
String get serverUrl => '信令服务器地址:';
|
||||
|
||||
@override
|
||||
String get serverUrlPlaceholder => 'wss://www.ttstd.com/signal';
|
||||
|
||||
@override
|
||||
String get deviceId => '本机设备ID(连接后由服务端下发,无需填写):';
|
||||
|
||||
@override
|
||||
String get deviceIdPlaceholder => '连接后由服务端下发';
|
||||
|
||||
@override
|
||||
String get targetDeviceId => '目标被控设备ID:';
|
||||
|
||||
@override
|
||||
String get targetDeviceIdPlaceholder => '被控端设备ID';
|
||||
|
||||
@override
|
||||
String get username => '用户名';
|
||||
|
||||
@override
|
||||
String get password => '密码';
|
||||
|
||||
@override
|
||||
String loginFailed(Object error) {
|
||||
return '登录失败:$error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get usernamePasswordRequired => '请输入用户名和密码';
|
||||
|
||||
@override
|
||||
String get serverAndTargetRequired => '请填写服务器地址和目标设备ID';
|
||||
|
||||
@override
|
||||
String get authTitle => '连接鉴权';
|
||||
|
||||
@override
|
||||
String get authNone => '免密连接';
|
||||
|
||||
@override
|
||||
String get authNoneDesc => '被控端弹出手动确认框,无需验证码或密码';
|
||||
|
||||
@override
|
||||
String get authCode => '动态验证码';
|
||||
|
||||
@override
|
||||
String get authCodeDesc => '使用一次性动态验证码鉴权';
|
||||
|
||||
@override
|
||||
String get authPassword => '固定密码';
|
||||
|
||||
@override
|
||||
String get authPasswordDesc => '使用固定连接密码鉴权';
|
||||
|
||||
@override
|
||||
String get authNonePlaceholder => '免密连接,无需填写';
|
||||
|
||||
@override
|
||||
String get authPasswordPlaceholder => '请输入固定密码';
|
||||
|
||||
@override
|
||||
String get authCodePlaceholder => '请输入动态验证码';
|
||||
|
||||
@override
|
||||
String get authValueRequired => '请输入验证码或密码';
|
||||
|
||||
@override
|
||||
String get statusStopped => '状态: 已停止';
|
||||
|
||||
@override
|
||||
String get statusConnectingSignal => '状态: 正在连接信令服务器...';
|
||||
|
||||
@override
|
||||
String get statusConnected => '状态: 已连接 - 远程控制中';
|
||||
|
||||
@override
|
||||
String get statusDisconnected => '状态: 远端已断开';
|
||||
|
||||
@override
|
||||
String get statusSignalConnected => '状态: 已连接信令服务器,等待注册...';
|
||||
|
||||
@override
|
||||
String statusRegistered(Object deviceId) {
|
||||
return '状态: 已注册 ($deviceId),正在发起连接...';
|
||||
}
|
||||
|
||||
@override
|
||||
String statusAuthFailed(Object error) {
|
||||
return '状态: 认证失败 - $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String statusConnectError(Object error) {
|
||||
return '状态: 连接错误 - $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get statusTargetAccept => '状态: 被控端已接受连接,正在建立连接...';
|
||||
|
||||
@override
|
||||
String statusTokenRefreshFailed(Object error) {
|
||||
return '状态: 令牌刷新失败 - $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get statusForceLogout => '状态: 账号已在其他位置登录,已强制下线';
|
||||
|
||||
@override
|
||||
String connectedBindings(Object uids) {
|
||||
return '已绑定设备: $uids';
|
||||
}
|
||||
|
||||
@override
|
||||
String get resolutionSwitch => '切换分辨率';
|
||||
|
||||
@override
|
||||
String get fpsSwitch => '切换帧率';
|
||||
|
||||
@override
|
||||
String get selfCodec => '自编码';
|
||||
|
||||
@override
|
||||
String get record => '录制';
|
||||
|
||||
@override
|
||||
String get stop => '停止';
|
||||
|
||||
@override
|
||||
String get recording => '录制中...';
|
||||
|
||||
@override
|
||||
String recordSaved(Object path) {
|
||||
return '已保存:$path';
|
||||
}
|
||||
|
||||
@override
|
||||
String get recordStopped => '录制已停止';
|
||||
|
||||
@override
|
||||
String get recordNoStream => '尚未连接或没有视频画面,无法录制';
|
||||
|
||||
@override
|
||||
String get recordSwitchToStd => '正在切回标准模式以开始录制...';
|
||||
|
||||
@override
|
||||
String recordStartFailed(Object error) {
|
||||
return '开始录制失败:$error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get recordNoVideoTrack => '尚未接收到视频画面,无法录制';
|
||||
|
||||
@override
|
||||
String get selfCodecNotSupported => '当前平台不支持自编码硬解,已回退到 WebRTC 媒体流。';
|
||||
|
||||
@override
|
||||
String get iceDisconnected => 'ICE 连接已断开';
|
||||
|
||||
@override
|
||||
String get targetOffline => '目标被控端不在线,请确认设备已开启并连接服务器';
|
||||
|
||||
@override
|
||||
String connectionFailed(Object error) {
|
||||
return '连接失败:$error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get tokenExpired => '登录已失效,请重新登录后再连接。';
|
||||
|
||||
@override
|
||||
String get forceLogout => '账号已在其他位置登录,已强制下线。';
|
||||
|
||||
@override
|
||||
String get loginFirst => '请先登录后再连接';
|
||||
|
||||
@override
|
||||
String get pleaseFillAuth => '请输入验证码或密码';
|
||||
|
||||
@override
|
||||
String get streamModeSelfCodecDesc => '当前平台不支持自编码硬解。';
|
||||
}
|
||||
67
webrtc_controller_flutter/lib/l10n/app_zh.arb
Normal file
67
webrtc_controller_flutter/lib/l10n/app_zh.arb
Normal file
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"@@locale": "zh",
|
||||
"appTitle": "WebRTC 控制端",
|
||||
"login": "登录",
|
||||
"logout": "退出登录",
|
||||
"cancel": "取消",
|
||||
"confirm": "确定",
|
||||
"connect": "连接",
|
||||
"connecting": "正在连接...",
|
||||
"loginAccount": "登录账号",
|
||||
"connectDevice": "连接被控设备",
|
||||
"serverUrl": "信令服务器地址:",
|
||||
"serverUrlPlaceholder": "wss://www.ttstd.com/signal",
|
||||
"deviceId": "本机设备ID(连接后由服务端下发,无需填写):",
|
||||
"deviceIdPlaceholder": "连接后由服务端下发",
|
||||
"targetDeviceId": "目标被控设备ID:",
|
||||
"targetDeviceIdPlaceholder": "被控端设备ID",
|
||||
"username": "用户名",
|
||||
"password": "密码",
|
||||
"loginFailed": "登录失败:{error}",
|
||||
"usernamePasswordRequired": "请输入用户名和密码",
|
||||
"serverAndTargetRequired": "请填写服务器地址和目标设备ID",
|
||||
"authTitle": "连接鉴权",
|
||||
"authNone": "免密连接",
|
||||
"authNoneDesc": "被控端弹出手动确认框,无需验证码或密码",
|
||||
"authCode": "动态验证码",
|
||||
"authCodeDesc": "使用一次性动态验证码鉴权",
|
||||
"authPassword": "固定密码",
|
||||
"authPasswordDesc": "使用固定连接密码鉴权",
|
||||
"authNonePlaceholder": "免密连接,无需填写",
|
||||
"authPasswordPlaceholder": "请输入固定密码",
|
||||
"authCodePlaceholder": "请输入动态验证码",
|
||||
"authValueRequired": "请输入验证码或密码",
|
||||
"statusStopped": "状态: 已停止",
|
||||
"statusConnectingSignal": "状态: 正在连接信令服务器...",
|
||||
"statusConnected": "状态: 已连接 - 远程控制中",
|
||||
"statusDisconnected": "状态: 远端已断开",
|
||||
"statusSignalConnected": "状态: 已连接信令服务器,等待注册...",
|
||||
"statusRegistered": "状态: 已注册 ({deviceId}),正在发起连接...",
|
||||
"statusAuthFailed": "状态: 认证失败 - {error}",
|
||||
"statusConnectError": "状态: 连接错误 - {error}",
|
||||
"statusTargetAccept": "状态: 被控端已接受连接,正在建立连接...",
|
||||
"statusTokenRefreshFailed": "状态: 令牌刷新失败 - {error}",
|
||||
"statusForceLogout": "状态: 账号已在其他位置登录,已强制下线",
|
||||
"connectedBindings": "已绑定设备: {uids}",
|
||||
"resolutionSwitch": "切换分辨率",
|
||||
"fpsSwitch": "切换帧率",
|
||||
"selfCodec": "自编码",
|
||||
"record": "录制",
|
||||
"stop": "停止",
|
||||
"recording": "录制中...",
|
||||
"recordSaved": "已保存:{path}",
|
||||
"recordStopped": "录制已停止",
|
||||
"recordNoStream": "尚未连接或没有视频画面,无法录制",
|
||||
"recordSwitchToStd": "正在切回标准模式以开始录制...",
|
||||
"recordStartFailed": "开始录制失败:{error}",
|
||||
"recordNoVideoTrack": "尚未接收到视频画面,无法录制",
|
||||
"selfCodecNotSupported": "当前平台不支持自编码硬解,已回退到 WebRTC 媒体流。",
|
||||
"iceDisconnected": "ICE 连接已断开",
|
||||
"targetOffline": "目标被控端不在线,请确认设备已开启并连接服务器",
|
||||
"connectionFailed": "连接失败:{error}",
|
||||
"tokenExpired": "登录已失效,请重新登录后再连接。",
|
||||
"forceLogout": "账号已在其他位置登录,已强制下线。",
|
||||
"loginFirst": "请先登录后再连接",
|
||||
"pleaseFillAuth": "请输入验证码或密码",
|
||||
"streamModeSelfCodecDesc": "当前平台不支持自编码硬解。"
|
||||
}
|
||||
Reference in New Issue
Block a user