-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ScreenShare works only once #3
Comments
@enzofrancescaHM Hi, I just looked into it and found out how to satisfy your requirement. By default, the |
I fixed this kind of issue not long ago in the basic-multi-streams.html example to register a track ended listener that calls |
@vincentfretin Thanks! But I have got a question here: When I use // Listen for the 'removetrack' event on the MediaStream
// that is emitted when the remote screen sharing stops.
// newStream.addEventListener('removetrack', () => {
// didn't invoke here?
// this._clearMediaStream();
// this._waitForMediaStream();
// });
newStream.oninactive = () => {
// it works
console.log('removed track', newStream);
this._clearMediaStream();
this._waitForMediaStream();
}; Is there anything wrong, or is it better to listen the |
The "removetrack" event may be specific to how the open-easyrtc lib is creating a new Stream object and adding and removing tracks, so may not work with mediasoup. |
Thanks, that makes sense. |
In the example, you can share the screen only once, the first time everything works without problems, but if you press disable screen share and the press again to share another time, nothing happens.
I think there are 2 different causes:
this approach has the benefit that it really close the screen sharing
Have you got some hints? Some area where I can investigate?
Thanks in advance
The text was updated successfully, but these errors were encountered: