diff --git a/flutter/lib/common/widgets/overlay.dart b/flutter/lib/common/widgets/overlay.dart index 3fb63616d..fc21ef8a6 100644 --- a/flutter/lib/common/widgets/overlay.dart +++ b/flutter/lib/common/widgets/overlay.dart @@ -606,6 +606,9 @@ class QualityMonitor extends StatelessWidget { _row( "Codec", qualityMonitorModel.data.codecFormat ?? '-'), _row("Chroma", qualityMonitorModel.data.chroma ?? '-'), + if (qualityMonitorModel.webrtcTransport != null) + _row("Transport", + qualityMonitorModel.webrtcTransport!), ], ), ) diff --git a/flutter/lib/desktop/pages/desktop_setting_page.dart b/flutter/lib/desktop/pages/desktop_setting_page.dart index 63a1e5a73..428855090 100644 --- a/flutter/lib/desktop/pages/desktop_setting_page.dart +++ b/flutter/lib/desktop/pages/desktop_setting_page.dart @@ -581,12 +581,15 @@ class _GeneralState extends State<_General> { kOptionEnableIpv6Punch, isServer: false, ), + ], + if (!incomingOnly) _OptionCheckBox( context, 'Enable WebRTC P2P connection', kOptionEnableWebrtc, isServer: false, ), + if (!isWeb && !incomingOnly) Tooltip( message: translate('sync-clipboard-between-sessions-tip'), child: _OptionCheckBox( @@ -596,7 +599,6 @@ class _GeneralState extends State<_General> { isServer: false, ), ), - ], ]; // Add client-side wakelock option for desktop platforms diff --git a/flutter/lib/models/model.dart b/flutter/lib/models/model.dart index e22782034..56c4462ca 100644 --- a/flutter/lib/models/model.dart +++ b/flutter/lib/models/model.dart @@ -3597,6 +3597,16 @@ class QualityMonitorModel with ChangeNotifier { bool get show => _show; QualityMonitorData get data => _data; + // Only a WebRTC session names its transport here: web has no session tab + // to show it on, and WebRTC is the one path that can be direct or TURN. + String? get webrtcTransport { + final ffiModel = parent.target?.ffiModel; + if (ffiModel == null) return null; + final streamType = ffiModel.cachedPeerData.streamType; + if (!streamType.startsWith('WebRTC')) return null; + return ffiModel.direct == false ? '$streamType (TURN)' : streamType; + } + checkShowQualityMonitor(SessionID sessionId) async { final show = await bind.sessionGetToggleOption( sessionId: sessionId, arg: 'show-quality-monitor') ==