Sfoglia il codice sorgente

fix: RTC track events emitted when switching jvb<->p2p

JitsiConference should emit JitsiConference events instead of RTC events
when adding/removing tracks on jvb<->p2p switch. This behaviour was mixing RTC layer
with the conference one. When conference switches from jvb to p2p it wants to make
the application switch to use p2p JitsiTracks, but it doesn't mean that the JVB tracks
have been removed on the RTC/peer connection level.
master
paweldomas 4 anni fa
parent
commit
f3199b7e2f
1 ha cambiato i file con 2 aggiunte e 3 eliminazioni
  1. 2
    3
      JitsiConference.js

+ 2
- 3
JitsiConference.js Vedi File

43
 import * as VideoSIPGWConstants from './modules/videosipgw/VideoSIPGWConstants';
43
 import * as VideoSIPGWConstants from './modules/videosipgw/VideoSIPGWConstants';
44
 import { JITSI_MEET_MUC_TYPE } from './modules/xmpp/xmpp';
44
 import { JITSI_MEET_MUC_TYPE } from './modules/xmpp/xmpp';
45
 import * as MediaType from './service/RTC/MediaType';
45
 import * as MediaType from './service/RTC/MediaType';
46
-import * as RTCEvents from './service/RTC/RTCEvents';
47
 import VideoType from './service/RTC/VideoType';
46
 import VideoType from './service/RTC/VideoType';
48
 import {
47
 import {
49
     ACTION_JINGLE_RESTART,
48
     ACTION_JINGLE_RESTART,
2745
 JitsiConference.prototype._addRemoteTracks = function(logName, remoteTracks) {
2744
 JitsiConference.prototype._addRemoteTracks = function(logName, remoteTracks) {
2746
     for (const track of remoteTracks) {
2745
     for (const track of remoteTracks) {
2747
         logger.info(`Adding remote ${logName} track: ${track}`);
2746
         logger.info(`Adding remote ${logName} track: ${track}`);
2748
-        this.rtc.eventEmitter.emit(RTCEvents.REMOTE_TRACK_ADDED, track);
2747
+        this.onRemoteTrackAdded(track);
2749
     }
2748
     }
2750
 };
2749
 };
2751
 
2750
 
2932
         remoteTracks) {
2931
         remoteTracks) {
2933
     for (const track of remoteTracks) {
2932
     for (const track of remoteTracks) {
2934
         logger.info(`Removing remote ${sessionNickname} track: ${track}`);
2933
         logger.info(`Removing remote ${sessionNickname} track: ${track}`);
2935
-        this.rtc.eventEmitter.emit(RTCEvents.REMOTE_TRACK_REMOVED, track);
2934
+        this.onRemoteTrackRemoved(track);
2936
     }
2935
     }
2937
 };
2936
 };
2938
 
2937
 

Loading…
Annulla
Salva