File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1040,11 +1040,26 @@ class _AttachVideoChatUrlButton extends StatelessWidget {
10401040 final ComposeBoxController controller;
10411041 final bool enabled;
10421042
1043+ static const int jitsi = 1 ;
1044+ static const int zoom = 2 ; //TODO: Add other supported video chat providers
1045+
10431046 String _generateJitsiUrl (String serverUrl, String visibleText) {
10441047 final id = List .generate (15 , (_) => Random .secure ().nextInt (10 )).join ();
10451048 return inlineLink (visibleText, '$serverUrl /$id #config.startWithVideoMuted=false' );
10461049 }
10471050
1051+ String ? _getMeetingUrl (ZulipLocalizations zulipLocalization, int ? provider, String ? jitsiServerUrl) {
1052+ final visibleText = zulipLocalization.composeBoxUploadedVideoCallUrl;
1053+
1054+ switch (provider) {
1055+ case 0 : return null ; //TODO: Implement feedback no video chat provider is setup
1056+ case jitsi: return jitsiServerUrl == null ? null : _generateJitsiUrl (jitsiServerUrl, visibleText);
1057+ case zoom: return inlineLink (visibleText,
1058+ 'https://zoom.us/start/meeting' );
1059+ default : return null ;
1060+ }
1061+ }
1062+
10481063 void _handlePress (BuildContext context) {
10491064 }
10501065
You can’t perform that action at this time.
0 commit comments