feat: Enable beta videocalls for linux

pull/516/head
krille-chan 2 years ago
parent f36d5f8a89
commit e229a0450f
No known key found for this signature in database

@ -1,4 +1,3 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart';
@ -77,7 +76,6 @@ class SettingsChatView extends StatelessWidget {
storeKey: SettingKeys.sendOnEnter, storeKey: SettingKeys.sendOnEnter,
defaultValue: AppConfig.sendOnEnter, defaultValue: AppConfig.sendOnEnter,
), ),
if (Matrix.of(context).webrtcIsSupported)
SettingsSwitchListTile.adaptive( SettingsSwitchListTile.adaptive(
title: L10n.of(context)!.experimentalVideoCalls, title: L10n.of(context)!.experimentalVideoCalls,
onChanged: (b) { onChanged: (b) {
@ -88,7 +86,7 @@ class SettingsChatView extends StatelessWidget {
storeKey: SettingKeys.experimentalVoip, storeKey: SettingKeys.experimentalVoip,
defaultValue: AppConfig.experimentalVoip, defaultValue: AppConfig.experimentalVoip,
), ),
if (Matrix.of(context).webrtcIsSupported && !kIsWeb) if (PlatformInfos.isMobile)
ListTile( ListTile(
title: Text(L10n.of(context)!.callingPermissions), title: Text(L10n.of(context)!.callingPermissions),
onTap: () => onTap: () =>

@ -78,12 +78,6 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
return widget.clients[_activeClient]; return widget.clients[_activeClient];
} }
bool get webrtcIsSupported =>
kIsWeb ||
PlatformInfos.isMobile ||
PlatformInfos.isWindows ||
PlatformInfos.isMacOS;
VoipPlugin? voipPlugin; VoipPlugin? voipPlugin;
bool get isMultiAccount => widget.clients.length > 1; bool get isMultiAccount => widget.clients.length > 1;
@ -406,7 +400,7 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
voipPlugin = null; voipPlugin = null;
return; return;
} }
voipPlugin = webrtcIsSupported ? VoipPlugin(this) : null; voipPlugin = VoipPlugin(this);
} }
@override @override

Loading…
Cancel
Save