|
@@ -1260,6 +1260,57 @@ export default {
|
1260
|
1260
|
APP.API.notifyReceivedChatMessage(id, nick, text, ts);
|
1261
|
1261
|
APP.UI.addMessage(id, nick, text, ts);
|
1262
|
1262
|
});
|
|
1263
|
+ APP.UI.addListener(UIEvents.MESSAGE_CREATED, (message) => {
|
|
1264
|
+ APP.API.notifySendingChatMessage(message);
|
|
1265
|
+ room.sendTextMessage(message);
|
|
1266
|
+ });
|
|
1267
|
+
|
|
1268
|
+ APP.UI.addListener(UIEvents.SELECTED_ENDPOINT, (id) => {
|
|
1269
|
+ try {
|
|
1270
|
+ // do not try to select participant if there is none (we
|
|
1271
|
+ // are alone in the room), otherwise an error will be
|
|
1272
|
+ // thrown cause reporting mechanism is not available
|
|
1273
|
+ // (datachannels currently)
|
|
1274
|
+ if (room.getParticipants().length === 0)
|
|
1275
|
+ return;
|
|
1276
|
+
|
|
1277
|
+ room.selectParticipant(id);
|
|
1278
|
+ } catch (e) {
|
|
1279
|
+ JitsiMeetJS.analytics.sendEvent(
|
|
1280
|
+ 'selectParticipant.failed');
|
|
1281
|
+ reportError(e);
|
|
1282
|
+ }
|
|
1283
|
+ });
|
|
1284
|
+
|
|
1285
|
+ APP.UI.addListener(UIEvents.PINNED_ENDPOINT,
|
|
1286
|
+ (smallVideo, isPinned) => {
|
|
1287
|
+ let smallVideoId = smallVideo.getId();
|
|
1288
|
+ let isLocal = APP.conference.isLocalId(smallVideoId);
|
|
1289
|
+
|
|
1290
|
+ let eventName
|
|
1291
|
+ = (isPinned ? "pinned" : "unpinned") + "." +
|
|
1292
|
+ (isLocal ? "local" : "remote");
|
|
1293
|
+ let participantCount = room.getParticipantCount();
|
|
1294
|
+ JitsiMeetJS.analytics.sendEvent(
|
|
1295
|
+ eventName,
|
|
1296
|
+ { value: participantCount });
|
|
1297
|
+
|
|
1298
|
+ // FIXME why VIDEO_CONTAINER_TYPE instead of checking if
|
|
1299
|
+ // the participant is on the large video ?
|
|
1300
|
+ if (smallVideo.getVideoType() === VIDEO_CONTAINER_TYPE
|
|
1301
|
+ && !isLocal) {
|
|
1302
|
+
|
|
1303
|
+ // When the library starts supporting multiple pins we
|
|
1304
|
+ // would pass the isPinned parameter together with the
|
|
1305
|
+ // identifier, but currently we send null to indicate that
|
|
1306
|
+ // we unpin the last pinned.
|
|
1307
|
+ try {
|
|
1308
|
+ room.pinParticipant(isPinned ? smallVideoId : null);
|
|
1309
|
+ } catch (e) {
|
|
1310
|
+ reportError(e);
|
|
1311
|
+ }
|
|
1312
|
+ }
|
|
1313
|
+ });
|
1263
|
1314
|
}
|
1264
|
1315
|
|
1265
|
1316
|
room.on(ConferenceEvents.CONNECTION_INTERRUPTED, () => {
|
|
@@ -1337,13 +1388,6 @@ export default {
|
1337
|
1388
|
APP.UI.addListener(UIEvents.AUDIO_MUTED, muteLocalAudio);
|
1338
|
1389
|
APP.UI.addListener(UIEvents.VIDEO_MUTED, muteLocalVideo);
|
1339
|
1390
|
|
1340
|
|
- if (!interfaceConfig.filmStripOnly) {
|
1341
|
|
- APP.UI.addListener(UIEvents.MESSAGE_CREATED, (message) => {
|
1342
|
|
- APP.API.notifySendingChatMessage(message);
|
1343
|
|
- room.sendTextMessage(message);
|
1344
|
|
- });
|
1345
|
|
- }
|
1346
|
|
-
|
1347
|
1391
|
room.on(ConnectionQualityEvents.LOCAL_STATS_UPDATED,
|
1348
|
1392
|
(stats) => {
|
1349
|
1393
|
APP.UI.updateLocalStats(stats.connectionQuality, stats);
|
|
@@ -1466,50 +1510,6 @@ export default {
|
1466
|
1510
|
AuthHandler.authenticate(room);
|
1467
|
1511
|
});
|
1468
|
1512
|
|
1469
|
|
- APP.UI.addListener(UIEvents.SELECTED_ENDPOINT, (id) => {
|
1470
|
|
- try {
|
1471
|
|
- // do not try to select participant if there is none (we are
|
1472
|
|
- // alone in the room), otherwise an error will be thrown cause
|
1473
|
|
- // reporting mechanism is not available (datachannels currently)
|
1474
|
|
- if (room.getParticipants().length === 0)
|
1475
|
|
- return;
|
1476
|
|
-
|
1477
|
|
- room.selectParticipant(id);
|
1478
|
|
- } catch (e) {
|
1479
|
|
- JitsiMeetJS.analytics.sendEvent('selectParticipant.failed');
|
1480
|
|
- reportError(e);
|
1481
|
|
- }
|
1482
|
|
- });
|
1483
|
|
-
|
1484
|
|
- APP.UI.addListener(UIEvents.PINNED_ENDPOINT, (smallVideo, isPinned) => {
|
1485
|
|
- let smallVideoId = smallVideo.getId();
|
1486
|
|
- let isLocal = APP.conference.isLocalId(smallVideoId);
|
1487
|
|
-
|
1488
|
|
- let eventName
|
1489
|
|
- = (isPinned ? "pinned" : "unpinned") + "." +
|
1490
|
|
- (isLocal ? "local" : "remote");
|
1491
|
|
- let participantCount = room.getParticipantCount();
|
1492
|
|
- JitsiMeetJS.analytics.sendEvent(
|
1493
|
|
- eventName,
|
1494
|
|
- { value: participantCount });
|
1495
|
|
-
|
1496
|
|
- // FIXME why VIDEO_CONTAINER_TYPE instead of checking if
|
1497
|
|
- // the participant is on the large video ?
|
1498
|
|
- if (smallVideo.getVideoType() === VIDEO_CONTAINER_TYPE
|
1499
|
|
- && !isLocal) {
|
1500
|
|
-
|
1501
|
|
- // When the library starts supporting multiple pins we would
|
1502
|
|
- // pass the isPinned parameter together with the identifier,
|
1503
|
|
- // but currently we send null to indicate that we unpin the
|
1504
|
|
- // last pinned.
|
1505
|
|
- try {
|
1506
|
|
- room.pinParticipant(isPinned ? smallVideoId : null);
|
1507
|
|
- } catch (e) {
|
1508
|
|
- reportError(e);
|
1509
|
|
- }
|
1510
|
|
- }
|
1511
|
|
- });
|
1512
|
|
-
|
1513
|
1513
|
APP.UI.addListener(
|
1514
|
1514
|
UIEvents.VIDEO_DEVICE_CHANGED,
|
1515
|
1515
|
(cameraDeviceId) => {
|