Update public/screenshare.js
Browse files- public/screenshare.js +5 -0
public/screenshare.js
CHANGED
|
@@ -632,6 +632,11 @@ class ScreenShareManager {
|
|
| 632 |
this.recognition.removeEventListener('end', this._handleRecognitionEnd);
|
| 633 |
this.recognition = null;
|
| 634 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 635 |
}
|
| 636 |
|
| 637 |
/**
|
|
|
|
| 632 |
this.recognition.removeEventListener('end', this._handleRecognitionEnd);
|
| 633 |
this.recognition = null;
|
| 634 |
}
|
| 635 |
+
|
| 636 |
+
// Defensive cleanup of track/listener and retry state
|
| 637 |
+
this._videoTrack = null;
|
| 638 |
+
this._surfaceChangeListener = null;
|
| 639 |
+
this._retryCount = 0;
|
| 640 |
}
|
| 641 |
|
| 642 |
/**
|