screen sharing events don't fire when windows close
Categories
(Core :: WebRTC: Audio/Video, defect)
Tracking
()
People
(Reporter: bkafle25, Unassigned)
Details
Steps to reproduce:
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.
I have used the following code :
screenRecordingStream.value =
await navigator.mediaDevices.getDisplayMedia(
displayMediaOptions
);
screenRecordingStream.value.getTracks().forEach((track) => {
track.addEventListener('ended', () => {
});
track.addEventListener('inactive', () => {
});
track.addEventListener('inactive', () => {
console.log('Track inactive');
// ...
});
track.addEventListener('mute', () => {
console.log('Track muted');
});
track.addEventListener('unmute', () => {
console.log('Track unmuted');
});
track.addEventListener('overconstrained', () => {
console.log('Track overconstrained');
});
track.addEventListener('readyStateChange', () => {
console.log('Track ready state changed');
});
});
Actual results:
The MediaStreamTrack object provides several events, such as ended and inactive, but these events are not fired when the user closes the selected window.
Expected results:
It should have trigger some sort of an event to detect when the selected window for screen sharing has been closed.
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::WebRTC: Audio/Video' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•2 years ago
|
||
Jib, can you comment on Firefox behavior related to windows being closed?
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Description
•