Access to RGB camera using Spin app
See original GitHub issueHi, I am also trying to perform tracking based on holojs and Spin capabilities but I can’t find a way to access to the Hololens camera. I notice someone mentioned it before in a closed issue #169:
@Almost-Done @xabuloes Yes I tried too and it works fine with the fix. Just a question, I tested successfully on SampleApps and ThreeJSApps but I can’t make it work on the HoloJSWebViewer, it can’t access the source “camera://local/default” through a Get. Any idea how to connect it to the webcam? (webcam and microphone capabilities added right ) Thanks!
Based on the code example of #169 issue, running on Spin, frame.onload
is never called.
I guess frame.src = "camera://local/default";
isn’t right or enough.
Can you please tell me if there is another way.
Thank you for your help.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Here’s a JS snippet:
After onload fires, you can set the source again to ‘camera://local/default’ and onload will fire again with a new photo. However, this is inefficient; a better way would be to have camera as a source for a Video element and grab frames as needed.
I merged the changes with https://github.com/microsoft/HoloJS/commit/3f2f2064f3f3e43e8a39849dd04ea5dede611a39
The fix is in the 1.5.0 NuGet package The fix is in Spin v3.1