瀏覽代碼

feat(tracks) Clean up the track if a source addition is rejected. (#10562)

* feat(tracks) Clean up the track if a source addition is rejected.
When jicofo rejects a source-add because of sendder limits, dispose and remove the local track from the conference.

* chore(deps) update LJM to latest.
master
Jaya Allamsetty 3 年之前
父節點
當前提交
700c7c523d
沒有連結到貢獻者的電子郵件帳戶。
共有 5 個檔案被更改,包括 27 行新增10 行删除
  1. 2
    0
      conference.js
  2. 6
    6
      package-lock.json
  3. 1
    1
      package.json
  4. 9
    1
      react/features/base/conference/actions.js
  5. 9
    2
      react/features/base/tracks/actions.js

+ 2
- 0
conference.js 查看文件

@@ -2135,6 +2135,8 @@ export default {
2135 2135
             }
2136 2136
         });
2137 2137
 
2138
+        room.on(JitsiConferenceEvents.TRACK_UNMUTE_REJECTED, track => APP.store.dispatch(destroyLocalTracks(track)));
2139
+
2138 2140
         room.on(JitsiConferenceEvents.SUBJECT_CHANGED,
2139 2141
             subject => APP.store.dispatch(conferenceSubjectChanged(subject)));
2140 2142
 

+ 6
- 6
package-lock.json 查看文件

@@ -65,7 +65,7 @@
65 65
         "jquery-i18next": "1.2.1",
66 66
         "js-md5": "0.6.1",
67 67
         "jwt-decode": "2.2.0",
68
-        "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#161da84ac045afd8ac8eed9168bd708dc0cbedb1",
68
+        "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#8aa35dae401f32a7eafe2b7dec159827c4bb2a84",
69 69
         "libflacjs": "github:mmig/libflac.js#93d37e7f811f01cf7d8b6a603e38bd3c3810907d",
70 70
         "lodash": "4.17.21",
71 71
         "moment": "2.29.1",
@@ -12509,8 +12509,8 @@
12509 12509
     },
12510 12510
     "node_modules/lib-jitsi-meet": {
12511 12511
       "version": "0.0.0",
12512
-      "resolved": "git+ssh://git@github.com/jitsi/lib-jitsi-meet.git#161da84ac045afd8ac8eed9168bd708dc0cbedb1",
12513
-      "integrity": "sha512-UPQrJjATYSerDZVezRpr+v9OMI94LYwimWyrDUg2Wpr2yfrDnIM90oqn62F9CwsE3QBBBLEZoTUk9K02z2d/Yg==",
12512
+      "resolved": "git+ssh://git@github.com/jitsi/lib-jitsi-meet.git#8aa35dae401f32a7eafe2b7dec159827c4bb2a84",
12513
+      "integrity": "sha512-i2cP4DaCj4sdf4dFDQTO3FO+Ds6/JgiSvboHj1pBS+L74767qWVhoVjDQ0LO76g+JhVoXECR9MEkr2CGgSKA8Q==",
12514 12514
       "hasInstallScript": true,
12515 12515
       "license": "Apache-2.0",
12516 12516
       "dependencies": {
@@ -29978,9 +29978,9 @@
29978 29978
       }
29979 29979
     },
29980 29980
     "lib-jitsi-meet": {
29981
-      "version": "git+ssh://git@github.com/jitsi/lib-jitsi-meet.git#161da84ac045afd8ac8eed9168bd708dc0cbedb1",
29982
-      "integrity": "sha512-UPQrJjATYSerDZVezRpr+v9OMI94LYwimWyrDUg2Wpr2yfrDnIM90oqn62F9CwsE3QBBBLEZoTUk9K02z2d/Yg==",
29983
-      "from": "lib-jitsi-meet@github:jitsi/lib-jitsi-meet#161da84ac045afd8ac8eed9168bd708dc0cbedb1",
29981
+      "version": "git+ssh://git@github.com/jitsi/lib-jitsi-meet.git#8aa35dae401f32a7eafe2b7dec159827c4bb2a84",
29982
+      "integrity": "sha512-i2cP4DaCj4sdf4dFDQTO3FO+Ds6/JgiSvboHj1pBS+L74767qWVhoVjDQ0LO76g+JhVoXECR9MEkr2CGgSKA8Q==",
29983
+      "from": "lib-jitsi-meet@github:jitsi/lib-jitsi-meet#8aa35dae401f32a7eafe2b7dec159827c4bb2a84",
29984 29984
       "requires": {
29985 29985
         "@jitsi/js-utils": "2.0.0",
29986 29986
         "@jitsi/logger": "2.0.0",

+ 1
- 1
package.json 查看文件

@@ -70,7 +70,7 @@
70 70
     "jquery-i18next": "1.2.1",
71 71
     "js-md5": "0.6.1",
72 72
     "jwt-decode": "2.2.0",
73
-    "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#161da84ac045afd8ac8eed9168bd708dc0cbedb1",
73
+    "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#8aa35dae401f32a7eafe2b7dec159827c4bb2a84",
74 74
     "libflacjs": "github:mmig/libflac.js#93d37e7f811f01cf7d8b6a603e38bd3c3810907d",
75 75
     "lodash": "4.17.21",
76 76
     "moment": "2.29.1",

+ 9
- 1
react/features/base/conference/actions.js 查看文件

@@ -27,7 +27,13 @@ import {
27 27
     participantRoleChanged,
28 28
     participantUpdated
29 29
 } from '../participants';
30
-import { getLocalTracks, replaceLocalTrack, trackAdded, trackRemoved } from '../tracks';
30
+import {
31
+    destroyLocalTracks,
32
+    getLocalTracks,
33
+    replaceLocalTrack,
34
+    trackAdded,
35
+    trackRemoved
36
+} from '../tracks';
31 37
 import { getBackendSafeRoomName } from '../util';
32 38
 
33 39
 import {
@@ -181,6 +187,8 @@ function _addConferenceListeners(conference, dispatch, state) {
181 187
             }
182 188
         });
183 189
 
190
+    conference.on(JitsiConferenceEvents.TRACK_UNMUTE_REJECTED, track => dispatch(destroyLocalTracks(track)));
191
+
184 192
     // Dispatches into features/base/participants follow:
185 193
     conference.on(
186 194
         JitsiConferenceEvents.DISPLAY_NAME_CHANGED,

+ 9
- 2
react/features/base/tracks/actions.js 查看文件

@@ -188,12 +188,19 @@ export function createLocalTracksA(options = {}) {
188 188
 }
189 189
 
190 190
 /**
191
- * Calls JitsiLocalTrack#dispose() on all local tracks ignoring errors when
191
+ * Calls JitsiLocalTrack#dispose() on the given track or on all local tracks (if none are passed) ignoring errors if
192 192
  * track is already disposed. After that signals tracks to be removed.
193 193
  *
194
+ * @param {JitsiLocalTrack|null} [track] - The local track that needs to be destroyed.
194 195
  * @returns {Function}
195 196
  */
196
-export function destroyLocalTracks() {
197
+export function destroyLocalTracks(track = null) {
198
+    if (track) {
199
+        return dispatch => {
200
+            dispatch(_disposeAndRemoveTracks([ track ]));
201
+        };
202
+    }
203
+
197 204
     return (dispatch, getState) => {
198 205
         // First wait until any getUserMedia in progress is settled and then get
199 206
         // rid of all local tracks.

Loading…
取消
儲存