@reactoo/watchtogether-sdk-js 2.5.86 → 2.5.87

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactoo/watchtogether-sdk-js",
3
- "version": "2.5.86",
3
+ "version": "2.5.87",
4
4
  "description": "Javascript SDK for Reactoo",
5
5
  "main": "src/index.js",
6
6
  "unpkg": "dist/watchtogether-sdk.min.js",
@@ -1966,7 +1966,7 @@ class RoomSession {
1966
1966
 
1967
1967
  this._setupTransceivers(this.handleId, [hasAudio, false, hasVideo, false]);
1968
1968
 
1969
- const emitEvents = function () {
1969
+ const emitEvents = () => {
1970
1970
  this.isPublished = true;
1971
1971
  if(config.stream) {
1972
1972
  let tracks = config.stream.getTracks();
@@ -2030,7 +2030,9 @@ class RoomSession {
2030
2030
 
2031
2031
  // this should be enough
2032
2032
  if(this.isPublished) {
2033
- return emitEvents();
2033
+ return Promise
2034
+ .all([audioTrackReplacePromise, videoTrackReplacePromise])
2035
+ .then(() => emitEvents())
2034
2036
  }
2035
2037
 
2036
2038
  return Promise