浏览代码

fix(load-test): Uses websocket if available and adds room param to the connection url.

master
damencho 4 年前
父节点
当前提交
f4d0ec1bb4
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3
    1
      resources/load-test/load-test-participant.js

+ 3
- 1
resources/load-test/load-test-participant.js 查看文件

178
  * That function is called when connection is established successfully
178
  * That function is called when connection is established successfully
179
  */
179
  */
180
 function onConnectionSuccess() {
180
 function onConnectionSuccess() {
181
-    room = connection.initJitsiConference(roomName, config);
181
+    room = connection.initJitsiConference(roomName.toLowerCase(), config);
182
     room.on(JitsiMeetJS.events.conference.TRACK_ADDED, onRemoteTrack);
182
     room.on(JitsiMeetJS.events.conference.TRACK_ADDED, onRemoteTrack);
183
     room.on(JitsiMeetJS.events.conference.CONFERENCE_JOINED, onConferenceJoined);
183
     room.on(JitsiMeetJS.events.conference.CONFERENCE_JOINED, onConferenceJoined);
184
     room.on(JitsiMeetJS.events.conference.USER_JOINED, id => {
184
     room.on(JitsiMeetJS.events.conference.USER_JOINED, id => {
232
 
232
 
233
 JitsiMeetJS.init(config);
233
 JitsiMeetJS.init(config);
234
 
234
 
235
+config.serviceUrl = config.bosh = `${config.websocket || config.bosh}?room=${roomName.toLowerCase()}`;
236
+
235
 connection = new JitsiMeetJS.JitsiConnection(null, null, config);
237
 connection = new JitsiMeetJS.JitsiConnection(null, null, config);
236
 connection.addEventListener(JitsiMeetJS.events.connection.CONNECTION_ESTABLISHED, onConnectionSuccess);
238
 connection.addEventListener(JitsiMeetJS.events.connection.CONNECTION_ESTABLISHED, onConnectionSuccess);
237
 connection.addEventListener(JitsiMeetJS.events.connection.CONNECTION_FAILED, onConnectionFailed);
239
 connection.addEventListener(JitsiMeetJS.events.connection.CONNECTION_FAILED, onConnectionFailed);

正在加载...
取消
保存