@reactoo/watchtogether-sdk-js 2.5.76 → 2.5.77

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.76",
3
+ "version": "2.5.77",
4
4
  "description": "Javascript SDK for Reactoo",
5
5
  "main": "src/index.js",
6
6
  "unpkg": "dist/watchtogether-sdk.min.js",
@@ -785,8 +785,13 @@ class RoomSession {
785
785
  }, true) : Promise.resolve()))
786
786
  .finally(() => {
787
787
  try {
788
- if (handle.webrtcStuff.stream && !this.isRestarting) {
789
- handle.webrtcStuff.stream.getTracks().forEach(track => track.stop());
788
+ if (handle.webrtcStuff.stream) {
789
+ if(!this.isRestarting) {
790
+ handle.webrtcStuff.stream.getTracks().forEach(track => track.stop());
791
+ }
792
+ else {
793
+ handle.webrtcStuff.stream.getTracks().forEach(track => track.onended = null);
794
+ }
790
795
  }
791
796
  } catch (e) {
792
797
  // Do nothing