Closed Bug 1669436 Opened 4 years ago Closed 4 years ago

MediaStreamTrack onended event is not called when shared window is closed

Categories

(Core :: WebRTC: Audio/Video, defect)

Firefox 81
defect

Tracking

()

RESOLVED DUPLICATE of bug 1615282

People

(Reporter: arm.ninoyan, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36

Steps to reproduce:

There is a problem with sharing of a particular window, by choosing it from the screen share popup dropdown.

Use mediaDevices.getDisplayMedia to open the screen share popup and set onended listener

navigator.mediaDevices
      .getDisplayMedia({
        ...
      }).then(stream => {
        track.onended = () => console.log('track ended');
      }

Actual results:

The listener won't be called when the user closes the window which was shared (this works fine in Google Chrome), and basically, you can't somehow detect that the actual track won't transfer any data, as it's readyState would still be live

Expected results:

The listener should be called and the readyState of the track should be changed to ended as the shared window is closed and there is no way the track would send any data.

Component: Untriaged → Audio/Video: MediaStreamGraph
Product: Firefox → Core
Component: Audio/Video: MediaStreamGraph → WebRTC: Audio/Video

Hi Jan-Ivar, could you please help me triage this one? Thanks!

Flags: needinfo?(jib)
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Flags: needinfo?(jib)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.