On Fri, Oct 6, 2023 at 2:07 AM Gerry Soetrisno <[email protected]> wrote:

> Hi,
>
> We have a requirement to access the media input devices that are
> available in the web browser our Guacamole are using.
>
> In the past we developed a web application leveraging the MediaDevices
> interface API to query the capability of the media devices (such as
> webcams on a Desktop PC, or smartphone cameras on a mobile phone), to
> capture an image/video stream and save into a local directory.
>
> Our aim is to facilitate a way for our Guacamole users to utilize their
> media devices to capture images; similar to the above scenario, but
> instead of saving the result into a local file, it should be
> transferred/copied across a Guacamole RDP session.
>
> What would be the best approach to develop the solution for the above
> scenario?
>
> Can the guacamole-common-js API be extended to pass through the
> image/video stream captured through the MediaDevices API into a capture
> program running inside a Guacamole RDP session?
>
>
Yes, it should be possible, in the same way that Guacamole uses audio
devices, to pass through media devices on the appropriate RDP channel(s).
At a high level:
* guacamole-common-js needs to be extended to access these devices, do any
browser initialization (requesting permissions to access the devices, for
example), and provide the data.
* guacd needs to be adjusted to take the incoming stream from the devices
and translate that to an appropriate RDP channel.

I've not, yet, tried to implement either of these components for any
devices, so that's a rough outline of what you'd need to do. I'd also say
that looking at how audio is handled in Guacamole, both the
guacamole-common-js and guacd components, is probably a reasonable starting
place to see what's required. The audio streaming in Guacamole deals with
conversion of the data between formats that are coming in on the browser
and those that remote access protocols (RDP, Pulse, etc.) support, which
may also be required for video support.

-Nick

Reply via email to