Closed Bug 1625694 Opened 4 years ago Closed 4 years ago

getDisplayMedia media stream is missing cursor on Linux

Categories

(Core :: WebRTC, defect, P3)

74 Branch
Unspecified
Linux
defect

Tracking

()

VERIFIED FIXED
mozilla78
Tracking Status
firefox-esr68 --- wontfix
firefox75 --- wontfix
firefox76 --- wontfix
firefox77 --- wontfix
firefox78 --- verified

People

(Reporter: graham, Assigned: dminor)

References

(Blocks 1 open bug)

Details

(Whiteboard: [jitsi-meet][wfh])

Attachments

(3 files)

Attached file cursor.html

User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0

Steps to reproduce:

When capturing screen using navigator.mediaDevices.getDisplayMedia({video: {cursor: "always"}}) the cursor does not render in the MediaStream.

This is a regression. Firefox renders the cursor correctly in 72.0.2 and 73.0.1. It does not render it in 74.0 and 75.0b10. Tested on Windows and MacOS.

I have attached an html file which reproduces it. That file is also here: https://darkcoding.net/cursor.html

Actual results:

The MediaStream did not include the cursor in FF 74 and 75. It DID include it in 72 and 73.

Expected results:

The MediaStream should include the cursor, according to the docs here: https://developer.mozilla.org/en-US/docs/Web/API/DisplayMediaStreamConstraints/video

Component: Untriaged → WebRTC
Product: Firefox → Core

Thank you for your bug report! I did some testing with Firefox Nightly (Firefox 76). It is working for me under Windows and OS X, but is broken on Linux. But it doesn't appear to be a recent regression, I tested back to Firefox 71 and it was still affected.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3

I can confirm it works on Windows and Mac with Nightly 76.0a1 (2020-03-30) (64-bit). That's great news!

I think Linux support should be a different bug. On Fedora / Wayland the cursor didn't show with FF 70 either, so probably it never worked. More importantly, Firefox only lets you select the full screen to share. Chromium can only share itself (full screen is black). I'm just happy it's already fixed for Mac and Win.

We don't seem to already have a bug on file for Linux. Since this seems to now be working on Nightly, I'll change this bug to refer specifically to the Linux problem. Thanks for checking again with Nightly!

Summary: getDisplayMedia media stream no longer includes cursor → getDisplayMedia media stream is missing cursor on Linux
Whiteboard: jitsi-meet
Whiteboard: jitsi-meet → [jitsi-meet]

The problem seems to be that at [1] the result is always OUTSIDE. If I hard code it to INSIDE, the cursor is rendered as expected.

[1] https://searchfox.org/mozilla-central/rev/567b68b8ff4b6d607ba34a6f1926873d21a7b4d7/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/mouse_cursor_monitor_x11.cc#161

Assignee: nobody → dminor
Status: NEW → ASSIGNED

I think inner_window_ was added to handle the fact that window_ may not be
the same as child_window which could throw off the coordinates. Since we made
these modifications, upstream has added the XTranslateCoordinates call that
handles this case, so our local modifications are no longer necessary.

Upstream has removed the mode used when use_desktop_relative_cursor_position_
is set to false as well as the associated override of OnMouseCursorPosition,
so the next time we update libwebrtc, this is the behaviour we will have.
Enabling it now fixes cursor display on Linux, which at the moment only works
for some windows.

Depends on D71392

Severity: normal → S3
OS: Unspecified → Linux
Pushed by dminor@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/407781119c09
Remove unnecessary local modifications to mouse_cursor_monitor_x11; r=jib,ng
https://hg.mozilla.org/integration/autoland/rev/191aba83fa73
Set use_desktop_relative_cursor_position in DesktopAndCursorComposer; r=ng
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
Whiteboard: [jitsi-meet] → [jitsi-meet][wfh]

The patch landed in nightly and beta is affected.
:dminor, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(dminor)

(In reply to gwarser from comment #11)

Possible regression https://bugzilla.mozilla.org/show_bug.cgi?id=1638091

This seems unlikely, this bug was about the cursor not being drawn during window sharing, but as far as I can tell, the symptoms in Bug 1638091 occur without a window being shared.

Flags: needinfo?(dminor)
Flags: qe-verify+

Reproduced the issue using Firefox 76.0a1 (20200328214049) on Ubuntu 18.04 and information from comment 0.
The issue is verified fixed with Firefox 78.0b7 (20200612174529) on Ubuntu 18.04.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
No longer depends on: 1646904

Actually, this issue appears again in 78.0.1 but only when sharing a second screen, not the main one. It was working fine in 77.0.1, though.

I just encountered this problem as well.
What I tested:

  • Windows 10, Firefox 83 -> no cursor (or the cursor is placed on the wrong position, but could not reproduce this behavior)
  • Windows 10, Firefox Beta (84) -> no cursor
  • Windows 10, Firefox nightly (85) -> no cursor
  • Ubuntu 20.04, Firefox 83 -> cursor present

For testing I used Bigbluebutton and on Windows with Firefox 83 additional Zoom. But there are no differences between zoom or Bigbluebutton.

So I think we should change the status?

(In reply to david.kirschenheuter from comment #15)

I just encountered this problem as well.
What I tested:

  • Windows 10, Firefox 83 -> no cursor (or the cursor is placed on the wrong position, but could not reproduce this behavior)
  • Windows 10, Firefox Beta (84) -> no cursor
  • Windows 10, Firefox nightly (85) -> no cursor
  • Ubuntu 20.04, Firefox 83 -> cursor present

For testing I used Bigbluebutton and on Windows with Firefox 83 additional Zoom. But there are no differences between zoom or Bigbluebutton.

So I think we should change the status?

Hi David,

This bug was specifically for Linux, which seems to still be working based on your testing. Please file a new bug for Windows.

Thanks!

Was there ever a Windows bug raised for this (as its still an issue)? I am looking but cannot see at the moment.

(In reply to Chris from comment #17)

Was there ever a Windows bug raised for this (as its still an issue)? I am looking but cannot see at the moment.

Not that I am aware of. Please file one :)

For reference (in case anyone finds this thread) - https://bugzilla.mozilla.org/show_bug.cgi?id=1691329

(In reply to Chris from comment #19)

For reference (in case anyone finds this thread) - https://bugzilla.mozilla.org/show_bug.cgi?id=1691329

Thank you!

Regressions: 1691329
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: