Closed Bug 1391439 Opened 7 years ago Closed 5 years ago

Add ability to capture and attach a screenshot through the Bugzilla UI

Categories

(bugzilla.mozilla.org :: Bug Creation/Editing, enhancement)

Production
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sheppy, Assigned: kohei)

References

Details

(Keywords: bmo-ux)

Attachments

(1 file)

The technology now exists to allow a site to trigger a request to capture screen contents. We should support using this to do screenshots and immediately attach them to the bug, so that this becomes a one-step process.
Are there APIs available that we can use to trigger a screenshot of another tab/window while editing a bug? What browsers are supported for this?
Flags: needinfo?(eshepherd)
The relevant API is this: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices

Not sure if it’s possible to take a screenshot of other tab. Even if the answer is yes, not sure people are comfortable with it for obvious security reasons. My idea from BzDeck [1] is to resurrect the Bugzilla sidebar removed years ago (Bug 589860) as a Firefox extension and include screen capturing functionality in it.

[1] https://github.com/bzdeck/bzdeck/issues/35
See Also: → 254127

@Kohei -- So, this API requires user consent before it will capture anything.

The specific API method for this is getDisplayMedia(): https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia

All you do is use the window value for the constraints object's video.displaySurface property, and the user will be prompted to pick a window. The frontmost tab would then be captured. Since you're reporting a bug by clicking a UI element on the page you're reporting a bug on, this is adequate.

Flags: needinfo?(eshepherd)
Attached file GitHub Pull Request

Thanks! I’ve tried, and it works!

Unlike Chrome, Firefox only allows to capture the current tab (= Bugzilla’s Create Attachment page) at this time, so the user has to open a new window though.

Assignee: nobody → kohei.yoshino
Status: NEW → ASSIGNED
Depends on: 1321221
Keywords: bmo-ux
Depends on: 1480469
No longer depends on: 1480469

Merged to master.

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: