|
@@ -19,6 +19,7 @@ import * as JitsiConferenceErrors from './JitsiConferenceErrors';
|
19
|
19
|
import * as JitsiConferenceEvents from './JitsiConferenceEvents';
|
20
|
20
|
import * as MediaType from './service/RTC/MediaType';
|
21
|
21
|
import RTCEvents from './service/RTC/RTCEvents';
|
|
22
|
+import VideoType from './service/RTC/VideoType';
|
22
|
23
|
import Statistics from './modules/statistics/statistics';
|
23
|
24
|
import XMPPEvents from './service/xmpp/XMPPEvents';
|
24
|
25
|
|
|
@@ -522,27 +523,36 @@ JitsiConferenceEventManager.prototype.setupRTCListeners = function() {
|
522
|
523
|
}
|
523
|
524
|
});
|
524
|
525
|
|
525
|
|
- if (conference.statistics) {
|
526
|
|
- rtc.addListener(RTCEvents.CREATE_ANSWER_FAILED,
|
527
|
|
- (e, tpc) => {
|
528
|
|
- conference.statistics.sendCreateAnswerFailed(e, tpc);
|
529
|
|
- });
|
|
526
|
+ rtc.addListener(RTCEvents.CREATE_ANSWER_FAILED,
|
|
527
|
+ (e, tpc) => {
|
|
528
|
+ conference.statistics.sendCreateAnswerFailed(e, tpc);
|
|
529
|
+ });
|
530
|
530
|
|
531
|
|
- rtc.addListener(RTCEvents.CREATE_OFFER_FAILED,
|
532
|
|
- (e, tpc) => {
|
533
|
|
- conference.statistics.sendCreateOfferFailed(e, tpc);
|
534
|
|
- });
|
|
531
|
+ rtc.addListener(RTCEvents.CREATE_OFFER_FAILED,
|
|
532
|
+ (e, tpc) => {
|
|
533
|
+ conference.statistics.sendCreateOfferFailed(e, tpc);
|
|
534
|
+ });
|
535
|
535
|
|
536
|
|
- rtc.addListener(RTCEvents.SET_LOCAL_DESCRIPTION_FAILED,
|
537
|
|
- (e, tpc) => {
|
538
|
|
- conference.statistics.sendSetLocalDescFailed(e, tpc);
|
539
|
|
- });
|
|
536
|
+ rtc.addListener(RTCEvents.SET_LOCAL_DESCRIPTION_FAILED,
|
|
537
|
+ (e, tpc) => {
|
|
538
|
+ conference.statistics.sendSetLocalDescFailed(e, tpc);
|
|
539
|
+ });
|
540
|
540
|
|
541
|
|
- rtc.addListener(RTCEvents.SET_REMOTE_DESCRIPTION_FAILED,
|
542
|
|
- (e, tpc) => {
|
543
|
|
- conference.statistics.sendSetRemoteDescFailed(e, tpc);
|
544
|
|
- });
|
545
|
|
- }
|
|
541
|
+ rtc.addListener(RTCEvents.SET_REMOTE_DESCRIPTION_FAILED,
|
|
542
|
+ (e, tpc) => {
|
|
543
|
+ conference.statistics.sendSetRemoteDescFailed(e, tpc);
|
|
544
|
+ });
|
|
545
|
+
|
|
546
|
+ rtc.addListener(RTCEvents.LOCAL_TRACK_SSRC_UPDATED,
|
|
547
|
+ (track, ssrc) => {
|
|
548
|
+ // when starting screen sharing, the track is created and when
|
|
549
|
+ // we do set local description and we process the ssrc we
|
|
550
|
+ // will be notified for it and we will report it with the event
|
|
551
|
+ // for screen sharing
|
|
552
|
+ if (track.isVideoTrack() && track.videoType === VideoType.DESKTOP) {
|
|
553
|
+ conference.statistics.sendScreenSharingEvent(true, ssrc);
|
|
554
|
+ }
|
|
555
|
+ });
|
546
|
556
|
};
|
547
|
557
|
|
548
|
558
|
/**
|