Open Bug 1615282 Opened 4 years ago Updated 2 months ago

Missing track ended event when closing a GetDisplayMedia shared window

Categories

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

73 Branch
Unspecified
All
defect

Tracking

()

ASSIGNED

People

(Reporter: jan, Assigned: jgrulich)

References

(Blocks 1 open bug)

Details

(Keywords: leave-open)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0

Steps to reproduce:

When sharing a window using GetDisplayMedia the track ended event is missing if you close this window.

Sample:
https://jsfiddle.net/oe75yrmv/1/

In chrome the event is fired properly.

Tested in ff 72/73/74

Actual results:

track ended event is missing

Expected results:

track ended event should be signaled when closing the shared window.

Summary: Missing track ended event when closing an GetDisplayMedia sahred window → Missing track ended event when closing an GetDisplayMedia shared window
Summary: Missing track ended event when closing an GetDisplayMedia shared window → Missing track ended event when closing a GetDisplayMedia shared window

Filed https://github.com/w3c/mediacapture-screen-share/issues/136.

Leaving it as defect for now since Chrome does this.

Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → All
Priority: -- → P2

Reproduced issue at Nightly 78. Neither closing captured screen or window nor executing stop() results in ended event being fired.

When stop() is executed ended attribute is set to true.

If the captured screen or window is simply closed track.readyState value is still "live" and track.muted value is false. How is that possible?

The spec issue in comment 1 has been closed, since the spec is already clear we should be firing the ended event here.

Severity: normal → S3

The severity field for this bug is relatively low, S3. However, the bug has 3 duplicates.
:jib, could you consider increasing the bug severity?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jib)
Flags: needinfo?(jib)
Assignee: nobody → jgrulich

In DesktopCapture, the callback OnCaptureResult also returns a result of
CaptureFrame, whether it was successful or failed. When ERROR_PERMANENT
is returned, it means that all the following attempts to capture a frame
will not succeed and at this point we should stop capturing. To stop
capturing, we propagate CaptureEnded event up to the DeviceListener and
stop screencast.

This is a simple backport of an WebRTC upstream change.

Upstream commit: 058bfe3ae37a7a245f9c8c6c03f4f7ac48fe179d

Pushed by pehrsons@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/633149c5da93
WebRTC backport: PipeWire capturer - set capturer as failed when session is closed r=pehrsons,webrtc-reviewers
Status: NEW → ASSIGNED
Keywords: leave-open
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: