소스 검색

fix(base/conference): tracks not added to the conference

If tracks are created while the conference is in the 'joining' state
they will never be added.
master
paweldomas 6 년 전
부모
커밋
e839684ae9
1개의 변경된 파일3개의 추가작업 그리고 5개의 파일을 삭제
  1. 3
    5
      react/features/base/conference/middleware.js

+ 3
- 5
react/features/base/conference/middleware.js 파일 보기

43
 import {
43
 import {
44
     _addLocalTracksToConference,
44
     _addLocalTracksToConference,
45
     forEachConference,
45
     forEachConference,
46
+    getCurrentConference,
46
     _handleParticipantError,
47
     _handleParticipantError,
47
     _removeLocalTracksFromConference
48
     _removeLocalTracksFromConference
48
 } from './functions';
49
 } from './functions';
620
  * @returns {Promise}
621
  * @returns {Promise}
621
  */
622
  */
622
 function _syncConferenceLocalTracksWithState({ getState }, action) {
623
 function _syncConferenceLocalTracksWithState({ getState }, action) {
623
-    const state = getState()['features/base/conference'];
624
-    const { conference } = state;
624
+    const conference = getCurrentConference(getState);
625
     let promise;
625
     let promise;
626
 
626
 
627
-    // XXX The conference may already be in the process of being left, that's
628
-    // why we should not add/remove local tracks to such conference.
629
-    if (conference && conference !== state.leaving) {
627
+    if (conference) {
630
         const track = action.track.jitsiTrack;
628
         const track = action.track.jitsiTrack;
631
 
629
 
632
         if (action.type === TRACK_ADDED) {
630
         if (action.type === TRACK_ADDED) {

Loading…
취소
저장