Browse Source

Removes unused code.

master
Boris Grozev 10 years ago
parent
commit
2117aefacc
3 changed files with 1 additions and 54 deletions
  1. 0
    12
      modules/UI/UI.js
  2. 0
    35
      modules/xmpp/JingleSessionPC.js
  3. 1
    7
      service/xmpp/XMPPEvents.js

+ 0
- 12
modules/UI/UI.js View File

302
             "dialog.internalError");
302
             "dialog.internalError");
303
     });
303
     });
304
 
304
 
305
-    APP.xmpp.addListener(XMPPEvents.SET_LOCAL_DESCRIPTION_ERROR, function () {
306
-        messageHandler.showError("dialog.error",
307
-            "dialog.SLDFailure");
308
-    });
309
-    APP.xmpp.addListener(XMPPEvents.SET_REMOTE_DESCRIPTION_ERROR, function () {
310
-        messageHandler.showError("dialog.error",
311
-            "dialog.SRDFailure");
312
-    });
313
-    APP.xmpp.addListener(XMPPEvents.CREATE_ANSWER_ERROR, function () {
314
-        messageHandler.showError();
315
-    });
316
     APP.xmpp.addListener(XMPPEvents.PROMPT_FOR_LOGIN, function (callback) {
305
     APP.xmpp.addListener(XMPPEvents.PROMPT_FOR_LOGIN, function (callback) {
317
         // FIXME: re-use LoginDialog which supports retries
306
         // FIXME: re-use LoginDialog which supports retries
318
         if (config.token) {
307
         if (config.token) {
899
 UI.setVideoMute = setVideoMute;
888
 UI.setVideoMute = setVideoMute;
900
 
889
 
901
 module.exports = UI;
890
 module.exports = UI;
902
-

+ 0
- 35
modules/xmpp/JingleSessionPC.js View File

1468
     }
1468
     }
1469
 };
1469
 };
1470
 
1470
 
1471
-// an attempt to work around https://github.com/jitsi/jitmeet/issues/32
1472
-// TODO: is this hack (along with the XMPPEvent-s used only for it) still needed
1473
-// now that we announce an SSRC for receive-only streams?
1474
-function sendKeyframe(pc) {
1475
-    console.log('sendkeyframe', pc.iceConnectionState);
1476
-    if (pc.iceConnectionState !== 'connected') return; // safe...
1477
-    pc.setRemoteDescription(
1478
-        pc.remoteDescription,
1479
-        function () {
1480
-            pc.createAnswer(
1481
-                function (modifiedAnswer) {
1482
-                    pc.setLocalDescription(
1483
-                        modifiedAnswer,
1484
-                        function () {
1485
-                            // noop
1486
-                        },
1487
-                        function (error) {
1488
-                            console.log('triggerKeyframe setLocalDescription failed', error);
1489
-                            eventEmitter.emit(XMPPEvents.SET_LOCAL_DESCRIPTION_ERROR);
1490
-                        }
1491
-                    );
1492
-                },
1493
-                function (error) {
1494
-                    console.log('triggerKeyframe createAnswer failed', error);
1495
-                    eventEmitter.emit(XMPPEvents.CREATE_ANSWER_ERROR);
1496
-                }
1497
-            );
1498
-        },
1499
-        function (error) {
1500
-            console.log('triggerKeyframe setRemoteDescription failed', error);
1501
-            eventEmitter.emit(XMPPEvents.SET_REMOTE_DESCRIPTION_ERROR);
1502
-        }
1503
-    );
1504
-}
1505
-
1506
 /**
1471
 /**
1507
  * Handles 'onaddstream' events from the RTCPeerConnection.
1472
  * Handles 'onaddstream' events from the RTCPeerConnection.
1508
  * @param event the 'onaddstream' event.
1473
  * @param event the 'onaddstream' event.

+ 1
- 7
service/xmpp/XMPPEvents.js View File

83
     RESERVATION_ERROR: "xmpp.room_reservation_error",
83
     RESERVATION_ERROR: "xmpp.room_reservation_error",
84
     DISPOSE_CONFERENCE: "xmpp.dispose_conference",
84
     DISPOSE_CONFERENCE: "xmpp.dispose_conference",
85
     GRACEFUL_SHUTDOWN: "xmpp.graceful_shutdown",
85
     GRACEFUL_SHUTDOWN: "xmpp.graceful_shutdown",
86
-    // TODO: only used in a hack, should probably be removed.
87
-    SET_LOCAL_DESCRIPTION_ERROR: 'xmpp.set_local_description_error',
88
-    // TODO: only used in a hack, should probably be removed.
89
-    SET_REMOTE_DESCRIPTION_ERROR: 'xmpp.set_remote_description_error',
90
-    // TODO: only used in a hack, should probably be removed.
91
-    CREATE_ANSWER_ERROR: 'xmpp.create_answer_error',
92
     JINGLE_FATAL_ERROR: 'xmpp.jingle_fatal_error',
86
     JINGLE_FATAL_ERROR: 'xmpp.jingle_fatal_error',
93
     PROMPT_FOR_LOGIN: 'xmpp.prompt_for_login',
87
     PROMPT_FOR_LOGIN: 'xmpp.prompt_for_login',
94
     FOCUS_DISCONNECTED: 'xmpp.focus_disconnected',
88
     FOCUS_DISCONNECTED: 'xmpp.focus_disconnected',
97
     // xmpp is connected and obtained user media
91
     // xmpp is connected and obtained user media
98
     READY_TO_JOIN: 'xmpp.ready_to_join'
92
     READY_TO_JOIN: 'xmpp.ready_to_join'
99
 };
93
 };
100
-module.exports = XMPPEvents;
94
+module.exports = XMPPEvents;

Loading…
Cancel
Save