Webcam image capture support #18997
veryphatic
started this conversation in
Feature Requests
Replies: 2 comments
-
Bump 🤜🤛 for ❤️ |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi, me again👋 I've just released a webcam interface https://github.com/veryphatic/directus-webcam-capture-interface I've put effort into ensuring it's compatible with the File List interface as well as incorporating some portable components and hooks.. Let me know what you think 😄 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
The existing single image file and multiple file interfaces are great. The image editor is a handy feature when working with single images; and it would be great if this could be added to the multiple file interface 😉, but I digress.
I'd like to request both these interfaces be extended with support to capture an image from the devices' web camera; either a built in webcam, or a USB webcam (both use the
navigator.mediaDevices
API, request the same permissions etc).Basic Example
No response
Motivation
I've been building a data collection system for a not for profit organisation. One of their requirements is to capture one or more images from a USB microscope camera (or mobile phone camera) and store the image as a data point in a collection.
Detailed Design
I originally looked at developing this feature into an extension, using both the
file-image
andfiles
interface as a starting point. From thefile-image
interface take the image editor, and use thefiles
interface to manage the images. However, thefiles
interface manages the files in a M2M relationship, has a bunch of private view components and is deeply integrated into Directus; making it difficult to copy and paste, and subsequently build this in a Directus way.I imagine, if it were being built into the core, it would be achieved with a simple
media device
component to:localstorage
video
elementcanvas
processing to resize and/or optimise the image to be within a target size).Requirements List
Must Have:
Should Have:
files
interfaceCould Have:
files
interface per rowWon't Have:
Drawbacks
I don't feel there are many drawbacks, if any. The
mediaDevices
API is stable and doesn't require any core changes to Directus or the existing interface components mentioned.Alternatives
As mentioned, the image support built into Directus is pretty great already; attempting to make this as an extension would result in doubling up on existing features and be more difficult than is necessary to manage the image-data relationships.
Adoption Strategy
Not a breaking change; it would simply provide a new option to upload a file.
Unresolved Questions
No response
Beta Was this translation helpful? Give feedback.
All reactions