@reactoo/watchtogether-sdk-js 2.5.6 → 2.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/modules/wt-room.js
CHANGED
|
@@ -103,6 +103,9 @@ class RoomSession {
|
|
|
103
103
|
};
|
|
104
104
|
|
|
105
105
|
constructor(constructId = null, type = 'reactooroom', debug, options = {}) {
|
|
106
|
+
|
|
107
|
+
Object.assign(this, emitter());
|
|
108
|
+
|
|
106
109
|
this.server = null;
|
|
107
110
|
this.iceServers = null;
|
|
108
111
|
this.token = null;
|
|
@@ -124,18 +127,15 @@ class RoomSession {
|
|
|
124
127
|
},
|
|
125
128
|
options
|
|
126
129
|
};
|
|
127
|
-
|
|
128
|
-
Object.assign(this, emitter());
|
|
129
|
-
|
|
130
130
|
this.id = null;
|
|
131
131
|
this.privateId = null;
|
|
132
|
-
|
|
133
132
|
this.constructId = constructId || RoomSession.randomString(16);
|
|
134
133
|
this.sessionId = null;
|
|
135
134
|
this.handleId = null;
|
|
136
135
|
this.ws = null;
|
|
137
136
|
this.isRestarting = false;
|
|
138
|
-
|
|
137
|
+
|
|
138
|
+
//TODO: do it better
|
|
139
139
|
// double click prevention
|
|
140
140
|
this.connectingPromise = null;
|
|
141
141
|
this.disconnectingPromise = null;
|
|
@@ -152,14 +152,11 @@ class RoomSession {
|
|
|
152
152
|
this._isStreaming = false;
|
|
153
153
|
this._isPublished = false;
|
|
154
154
|
this._isDataChannelOpen = false;
|
|
155
|
-
|
|
156
155
|
this.isAudioMuted = false;
|
|
157
156
|
this.isVideoMuted = false;
|
|
158
157
|
this.isVideoEnabled = false;
|
|
159
158
|
this.isAudioEnabed = false;
|
|
160
|
-
|
|
161
159
|
this.isUnifiedPlan = RoomSession.checkUnifiedPlan();
|
|
162
|
-
|
|
163
160
|
this._log = RoomSession.noop;
|
|
164
161
|
if (this.options.debug) {
|
|
165
162
|
this._enableDebug();
|
|
@@ -682,6 +679,7 @@ class RoomSession {
|
|
|
682
679
|
track: null,
|
|
683
680
|
adding: false,
|
|
684
681
|
constructId: this.constructId,
|
|
682
|
+
metaData: this.options.metaData,
|
|
685
683
|
hasAudioTrack: false,
|
|
686
684
|
hasVideoTrack: false
|
|
687
685
|
});
|
|
@@ -1271,6 +1269,7 @@ class RoomSession {
|
|
|
1271
1269
|
stream: config.stream,
|
|
1272
1270
|
track: event.track,
|
|
1273
1271
|
constructId: this.constructId,
|
|
1272
|
+
metaData: this.options.metaData,
|
|
1274
1273
|
adding: true,
|
|
1275
1274
|
hasAudioTrack: !!(config.stream && config.stream.getAudioTracks().length),
|
|
1276
1275
|
hasVideoTrack: !!(config.stream && config.stream.getVideoTracks().length)
|
|
@@ -1305,6 +1304,7 @@ class RoomSession {
|
|
|
1305
1304
|
stream: config.stream,
|
|
1306
1305
|
track: ev.target,
|
|
1307
1306
|
constructId: this.constructId,
|
|
1307
|
+
metaData: this.options.metaData,
|
|
1308
1308
|
adding: false,
|
|
1309
1309
|
hasAudioTrack: !!(config.stream && config.stream.getAudioTracks().length),
|
|
1310
1310
|
hasVideoTrack: !!(config.stream && config.stream.getVideoTracks().length)
|