Access HoloLens 2 camera from UWP APP

%3CLINGO-SUB%20id%3D%22lingo-sub-2248519%22%20slang%3D%22en-US%22%3EAccess%20HoloLens%202%20camera%20from%20UWP%20APP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2248519%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20a%20software%20developer%20and%20our%20customer%20has%20bought%20hundreds%20of%20HoloLens%202%20devices.%20Now%20our%20goal%20is%20to%20develop%20kind%20of%20Zoom%20Meetings%20within%20private%20corporate%20network%20using%20HoloLens2%20camera%20and%20microphone.%20I%20have%20seen%20that%20%22Microsoft%20Dynamics%20365%20Remote%20Assist%22%20says%20it%20can%20do%20the%20same%20thing%20so%20I%20believe%20this%20is%20technically%20possible.%20Now%20I%20do%20have%20few%20problems%3A%3C%2FP%3E%3CP%3E1)%20Since%20I%20do%20not%20have%20HoloLens%202%20device%20yet%20I'm%20trying%20to%20install%26nbsp%3B%22Microsoft%20Dynamics%20365%20Remote%20Assist%22%20app%20on%20the%20emulator.%20The%20problem%20is%20that%20it%20can't%20access%20the%20camera%20and%20stuck.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Anubis505_0-1617264316489.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F268798i25F751C885827EFD%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Anubis505_0-1617264316489.png%22%20alt%3D%22Anubis505_0-1617264316489.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThis%20gray%20window%20does%20not%20dissappear%20even%20though%20I%20allowed%20access%20to%20the%20camera.%20I%20can't%20close%20it%20or%20escape%20from%20it.%26nbsp%3B%3C%2FP%3E%3CP%3E2)%20When%20I%20turn%20off%20and%20on%20again%20the%20emulator%20it%20starts%20from%20scratch.%20No%20account%20settings%20or%20installed%20apps%20are%20available%20and%20I%20have%20to%20login%20to%20microsoft%20account%20and%20install%20them%20again.%26nbsp%3B%3C%2FP%3E%3CP%3E3)%20Looks%20like%20HoloLens%202%20camera%20is%20present%20in%20a%20system%20in%20some%20special%20way%20because%20noone%20regular%20camera%20UWP%20application%20can%20see%20the%20camera.%20If%20so%20then%20what%20should%20I%20read%20understand%20how%20to%20access%20HoloLens%202%20camera%20from%20the%20UWP%20app%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I'm a software developer and our customer has bought hundreds of HoloLens 2 devices. Now our goal is to develop kind of Zoom Meetings within private corporate network using HoloLens2 camera and microphone. I have seen that "Microsoft Dynamics 365 Remote Assist" says it can do the same thing so I believe this is technically possible. Now I do have few problems:

1) Since I do not have HoloLens 2 device yet I'm trying to install "Microsoft Dynamics 365 Remote Assist" app on the emulator. The problem is that it can't access the camera and stuck.

Anubis505_0-1617264316489.png

This gray window does not dissappear even though I allowed access to the camera. I can't close it or escape from it. 

2) When I turn off and on again the emulator it starts from scratch. No account settings or installed apps are available and I have to login to microsoft account and install them again. 

3) Looks like HoloLens 2 camera is present in a system in some special way because noone regular camera UWP application can see the camera. If so then what should I read understand how to access HoloLens 2 camera from the UWP app?

2 Replies

@lAnubisl 

The emulator has some interesting behavior with regards to restarting, since it's more of a dev tool than anything else. Every time it shuts down and starts back up, it's basically a fresh OS. However, if you go to the Account Settings, you can tell it to log into a specific user on startup. That'll save you a bit of time, but you'll still need to install apps! If you're using it for long stretches of time, it can be good to get in the habit of minimizing it instead of closing it.

 

I'm not sure about camera behavior in the emulator though, I don't know what I'd even expect to see if it did work! However, if your app works with the camera in a regular UWP app, you're probably good to go. I've done a bunch of camera code for HoloLens in regular flat UWP applications with the Window.Media.Capture API, and it's pretty good about working wherever! I don't have any good samples for the API off the top of my head, but that's probably what I'd use.

For meeting based software, I'd also encourage you to learn a bit about Microsoft Mesh, and there's also a tool called MixedReality-WebRTC that could be helpful to you if you're doing it from scratch :)

@koujaku Thank you very much for your reply. I will investigate the links you provided.

www.000webhost.com