mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
feat(webrtc): 添加公共ICE服务器支持和优化HID延迟
- 重构ICE配置:将TURN配置改为统一的ICE配置,支持STUN和多TURN URL - 添加公共ICE服务器:类似RustDesk,用户留空时使用编译时配置的公共服务器 - 优化DataChannel HID消息:使用tokio::spawn立即处理,避免依赖webrtc-rs轮询 - 添加WebRTCReady事件:客户端等待此事件后再建立连接 - 初始化时启动音频流,确保WebRTC可订阅 - 移除多余的trace/debug日志减少开销 - 更新前端配置界面支持公共ICE服务器显示
This commit is contained in:
@@ -283,12 +283,12 @@ export default {
|
||||
fullscreen: 'Fullscreen',
|
||||
exitFullscreen: 'Exit Fullscreen',
|
||||
screenshot: 'Screenshot',
|
||||
reconnect: 'Reconnect',
|
||||
reconnect: 'Refresh Page',
|
||||
noVideo: 'No video signal',
|
||||
connecting: 'Connecting...',
|
||||
streamOffline: 'Stream offline',
|
||||
connectionFailed: 'Connection Failed',
|
||||
connectionFailedDesc: 'Unable to connect to video stream, please check device status',
|
||||
connectionFailedDesc: 'Unable to connect to video stream, please refresh page or check device status',
|
||||
videoRestarting: 'Video stream is restarting',
|
||||
deviceSwitching: 'Switching video device...',
|
||||
configChanging: 'Applying new configuration...',
|
||||
@@ -570,16 +570,18 @@ export default {
|
||||
// WebRTC / ICE
|
||||
webrtcSettings: 'WebRTC Settings',
|
||||
webrtcSettingsDesc: 'Configure STUN/TURN servers for NAT traversal',
|
||||
usingPublicIceServers: 'Using public ICE servers',
|
||||
publicIceServersHint: 'Leave empty to use built-in public STUN/TURN servers for NAT traversal',
|
||||
stunServer: 'STUN Server',
|
||||
stunServerPlaceholder: 'stun:stun.l.google.com:19302',
|
||||
stunServerHint: 'STUN server for NAT traversal (e.g., stun:stun.l.google.com:19302)',
|
||||
stunServerHint: 'Custom STUN server (leave empty to use public server)',
|
||||
turnServer: 'TURN Server',
|
||||
turnServerPlaceholder: 'turn:turn.example.com:3478',
|
||||
turnServerHint: 'TURN relay server for restrictive networks (optional)',
|
||||
turnServerHint: 'Custom TURN relay server (leave empty to use public server)',
|
||||
turnUsername: 'TURN Username',
|
||||
turnPassword: 'TURN Password',
|
||||
turnPasswordConfigured: 'Password already configured. Leave empty to keep current password.',
|
||||
turnCredentialsHint: 'Credentials for TURN server authentication',
|
||||
turnCredentialsHint: 'Credentials for TURN server authentication (only needed for custom servers)',
|
||||
iceConfigNote: 'Note: Changes require reconnecting the WebRTC session to take effect.',
|
||||
},
|
||||
virtualKeyboard: {
|
||||
@@ -628,6 +630,7 @@ export default {
|
||||
absolute: 'Absolute',
|
||||
relative: 'Relative',
|
||||
connection: 'Connection',
|
||||
channel: 'Channel',
|
||||
networkError: 'Network Error',
|
||||
disconnected: 'Disconnected',
|
||||
availability: 'Availability',
|
||||
@@ -637,6 +640,7 @@ export default {
|
||||
quality: 'Quality',
|
||||
streaming: 'Streaming',
|
||||
off: 'Off',
|
||||
defaultDevice: 'Default',
|
||||
notConnected: 'Not Connected',
|
||||
connected: 'Connected',
|
||||
image: 'Image',
|
||||
|
||||
@@ -283,12 +283,12 @@ export default {
|
||||
fullscreen: '全屏',
|
||||
exitFullscreen: '退出全屏',
|
||||
screenshot: '截图',
|
||||
reconnect: '重新连接',
|
||||
reconnect: '刷新网页',
|
||||
noVideo: '无视频信号',
|
||||
connecting: '正在连接...',
|
||||
streamOffline: '视频流离线',
|
||||
connectionFailed: '连接失败',
|
||||
connectionFailedDesc: '无法连接到视频流,请检查设备状态',
|
||||
connectionFailedDesc: '无法连接到视频流,请刷新网页或检查设备状态',
|
||||
videoRestarting: '视频流正在重启',
|
||||
deviceSwitching: '正在切换视频设备...',
|
||||
configChanging: '正在应用新配置...',
|
||||
@@ -570,16 +570,18 @@ export default {
|
||||
// WebRTC / ICE
|
||||
webrtcSettings: 'WebRTC 设置',
|
||||
webrtcSettingsDesc: '配置 STUN/TURN 服务器以实现 NAT 穿透',
|
||||
usingPublicIceServers: '正在使用公共 ICE 服务器',
|
||||
publicIceServersHint: '留空以使用内置的公共 STUN/TURN 服务器进行 NAT 穿透',
|
||||
stunServer: 'STUN 服务器',
|
||||
stunServerPlaceholder: 'stun:stun.l.google.com:19302',
|
||||
stunServerHint: '用于 NAT 穿透的 STUN 服务器(例如:stun:stun.l.google.com:19302)',
|
||||
stunServerHint: '自定义 STUN 服务器(留空则使用公共服务器)',
|
||||
turnServer: 'TURN 服务器',
|
||||
turnServerPlaceholder: 'turn:turn.example.com:3478',
|
||||
turnServerHint: '用于限制性网络的 TURN 中继服务器(可选)',
|
||||
turnServerHint: '自定义 TURN 中继服务器(留空则使用公共服务器)',
|
||||
turnUsername: 'TURN 用户名',
|
||||
turnPassword: 'TURN 密码',
|
||||
turnPasswordConfigured: '密码已配置。留空则保持当前密码。',
|
||||
turnCredentialsHint: '用于 TURN 服务器认证的凭据',
|
||||
turnCredentialsHint: '用于 TURN 服务器认证的凭据(仅自定义服务器需要)',
|
||||
iceConfigNote: '注意:更改后需要重新连接 WebRTC 会话才能生效。',
|
||||
},
|
||||
virtualKeyboard: {
|
||||
@@ -628,6 +630,7 @@ export default {
|
||||
absolute: '绝对定位',
|
||||
relative: '相对定位',
|
||||
connection: '连接',
|
||||
channel: '通道',
|
||||
networkError: '网络错误',
|
||||
disconnected: '已断开',
|
||||
availability: '可用性',
|
||||
@@ -637,6 +640,7 @@ export default {
|
||||
quality: '质量',
|
||||
streaming: '传输中',
|
||||
off: '关闭',
|
||||
defaultDevice: '默认',
|
||||
notConnected: '未连接',
|
||||
connected: '已连接',
|
||||
image: '镜像',
|
||||
|
||||
Reference in New Issue
Block a user