@@ -61,7 +61,6 @@ import Matrix from 'matrix-js-sdk';
61
61
import dis from './dispatcher' ;
62
62
import SdkConfig from './SdkConfig' ;
63
63
import { showUnknownDeviceDialogForCalls } from './cryptodevices' ;
64
- import SettingsStore from "./settings/SettingsStore" ;
65
64
import WidgetUtils from './utils/WidgetUtils' ;
66
65
import WidgetEchoStore from './stores/WidgetEchoStore' ;
67
66
import ScalarAuthClient from './ScalarAuthClient' ;
@@ -301,67 +300,7 @@ function _onAction(payload) {
301
300
break ;
302
301
case 'place_conference_call' :
303
302
console . log ( "Place conference call in %s" , payload . room_id ) ;
304
-
305
- if ( SettingsStore . isFeatureEnabled ( 'feature_jitsi' ) ) {
306
- _startCallApp ( payload . room_id , payload . type ) ;
307
- } else {
308
- if ( MatrixClientPeg . get ( ) . isRoomEncrypted ( payload . room_id ) ) {
309
- // Conference calls are implemented by sending the media to central
310
- // server which combines the audio from all the participants together
311
- // into a single stream. This is incompatible with end-to-end encryption
312
- // because a central server would be decrypting the audio for each
313
- // participant.
314
- // Therefore we disable conference calling in E2E rooms.
315
- const ErrorDialog = sdk . getComponent ( "dialogs.ErrorDialog" ) ;
316
- Modal . createTrackedDialog ( 'Call Handler' , 'Conference calls unsupported e2e' , ErrorDialog , {
317
- description : _t ( 'Conference calls are not supported in encrypted rooms' ) ,
318
- } ) ;
319
- return ;
320
- }
321
-
322
- if ( ! ConferenceHandler ) {
323
- const ErrorDialog = sdk . getComponent ( "dialogs.ErrorDialog" ) ;
324
- Modal . createTrackedDialog ( 'Call Handler' , 'Conference call unsupported client' , ErrorDialog , {
325
- description : _t ( 'Conference calls are not supported in this client' ) ,
326
- } ) ;
327
- } else if ( ! MatrixClientPeg . get ( ) . supportsVoip ( ) ) {
328
- const ErrorDialog = sdk . getComponent ( "dialogs.ErrorDialog" ) ;
329
- Modal . createTrackedDialog ( 'Call Handler' , 'VoIP is unsupported' , ErrorDialog , {
330
- title : _t ( 'VoIP is unsupported' ) ,
331
- description : _t ( 'You cannot place VoIP calls in this browser.' ) ,
332
- } ) ;
333
- } else {
334
- const QuestionDialog = sdk . getComponent ( "dialogs.QuestionDialog" ) ;
335
- Modal . createTrackedDialog ( 'Call Handler' , 'Conference calling in development' , QuestionDialog , {
336
- title : _t ( 'Warning!' ) ,
337
- description : _t ( 'Conference calling is in development and may not be reliable.' ) ,
338
- onFinished : ( confirm ) => {
339
- if ( confirm ) {
340
- ConferenceHandler . createNewMatrixCall (
341
- MatrixClientPeg . get ( ) , payload . room_id ,
342
- ) . done ( function ( call ) {
343
- placeCall ( call ) ;
344
- } , function ( err ) {
345
- const ErrorDialog = sdk . getComponent ( "dialogs.ErrorDialog" ) ;
346
- console . error ( "Conference call failed: " + err ) ;
347
- Modal . createTrackedDialog (
348
- 'Call Handler' ,
349
- 'Failed to set up conference call' ,
350
- ErrorDialog ,
351
- {
352
- title : _t ( 'Failed to set up conference call' ) ,
353
- description : (
354
- _t ( 'Conference call failed.' ) +
355
- ' ' + ( ( err && err . message ) ? err . message : '' )
356
- ) ,
357
- } ,
358
- ) ;
359
- } ) ;
360
- }
361
- } ,
362
- } ) ;
363
- }
364
- }
303
+ _startCallApp ( payload . room_id , payload . type ) ;
365
304
break ;
366
305
case 'incoming_call' :
367
306
{
@@ -543,6 +482,24 @@ const callHandler = {
543
482
return null ;
544
483
} ,
545
484
485
+ /**
486
+ * The conference handler is a module that deals with implementation-specific
487
+ * multi-party calling implementations. Riot passes in its own which creates
488
+ * a one-to-one call with a freeswitch conference bridge. As of July 2018,
489
+ * the de-facto way of conference calling is a Jitsi widget, so this is
490
+ * deprecated. It reamins here for two reasons:
491
+ * 1. So Riot still supports joining existing freeswitch conference calls
492
+ * (but doesn't support creating them). After a transition period, we can
493
+ * remove support for joining them too.
494
+ * 2. To hide the one-to-one rooms that old-style conferencing creates. This
495
+ * is much harder to remove: probably either we make Riot leave & forget these
496
+ * rooms after we remove support for joining freeswitch conferences, or we
497
+ * accept that random rooms with cryptic users will suddently appear for
498
+ * anyone who's ever used conference calling, or we are stuck with this
499
+ * code forever.
500
+ *
501
+ * @param {object } confHandler The conference handler object
502
+ */
546
503
setConferenceHandler : function ( confHandler ) {
547
504
ConferenceHandler = confHandler ;
548
505
} ,
0 commit comments