From 4b0c17c698aa5bea3a5eb86ff17c29ca5e4b7acc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5var=20Aamb=C3=B8=20Fosstveit?= Date: Mon, 4 Nov 2019 14:43:14 +0100 Subject: [PATCH] Fix filesharing after code splitting. --- app/src/RoomClient.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/src/RoomClient.js b/app/src/RoomClient.js index 7cbb58c..48627c6 100644 --- a/app/src/RoomClient.js +++ b/app/src/RoomClient.js @@ -144,13 +144,7 @@ export default class RoomClient this._doneJoining = false; // Our WebTorrent client - this._webTorrent = this._torrentSupport && new WebTorrent({ - tracker : { - rtcConfig : { - iceServers : ROOM_OPTIONS.turnServers - } - } - }); + this._webTorrent = null; // Max spotlights if (device.bowser.ios || device.bowser.mobile || device.bowser.android) @@ -1203,6 +1197,14 @@ export default class RoomClient this._torrentSupport = WebTorrent.WEBRTC_SUPPORT; + this._webTorrent = this._torrentSupport && new WebTorrent({ + tracker : { + rtcConfig : { + iceServers : ROOM_OPTIONS.turnServers + } + } + }); + this._screenSharing = ScreenShare.create(this._device); this._signalingSocket = io(this._signalingUrl);