Relative Content

Tag Archive for firefoxmediastreamscreen-recordingmediastreamsource

Is there any way to know that the selected window for screen sharing is closed in firefox browser?

When using the MediaStream API to capture a screen recording in Firefox, it’s challenging to detect when the selected window for screen sharing is closed. The MediaStreamTrack object provides several events, such as ended and inactive, but these events are not fired when the user closes the selected window.
Note: This issue is specific to Firefox, as Chrome, Safari, and Edge browsers work correctly in this scenario.
Following is the code i am using right now: