|
|
@@ -331,16 +331,18 @@ JitsiConference.prototype.addTrack = function (track) {
|
|
331
|
331
|
this.room.addListener(XMPPEvents.SENDRECV_STREAMS_CHANGED,
|
|
332
|
332
|
track.ssrcHandler);
|
|
333
|
333
|
|
|
334
|
|
- // Report active device to statistics
|
|
335
|
|
- var devices = RTC.getCurrentlyAvailableMediaDevices();
|
|
336
|
|
- device = devices.find(function (d) {
|
|
337
|
|
- return d.kind === track.getTrack().kind + 'input'
|
|
338
|
|
- && d.label === track.getTrack().label;
|
|
339
|
|
- });
|
|
340
|
|
-
|
|
341
|
|
- Statistics.sendАctiveDeviceListEvent(
|
|
342
|
|
- RTC.getEventDataForActiveDevice(device));
|
|
343
|
|
-
|
|
|
334
|
+ if(track.isAudioTrack() || (track.isVideoTrack() &&
|
|
|
335
|
+ track.videoType !== "desktop")) {
|
|
|
336
|
+ // Report active device to statistics
|
|
|
337
|
+ var devices = RTC.getCurrentlyAvailableMediaDevices();
|
|
|
338
|
+ device = devices.find(function (d) {
|
|
|
339
|
+ return d.kind === track.getTrack().kind + 'input'
|
|
|
340
|
+ && d.label === track.getTrack().label;
|
|
|
341
|
+ });
|
|
|
342
|
+ if(device)
|
|
|
343
|
+ Statistics.sendАctiveDeviceListEvent(
|
|
|
344
|
+ RTC.getEventDataForActiveDevice(device));
|
|
|
345
|
+ }
|
|
344
|
346
|
return new Promise(function (resolve, reject) {
|
|
345
|
347
|
this.room.addStream(track.getOriginalStream(), function () {
|
|
346
|
348
|
if (track.isVideoTrack()) {
|