Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this browser does not support video capture,or this device does not have a camera #8

Open
electroMedia666 opened this issue Oct 23, 2021 · 5 comments

Comments

@electroMedia666
Copy link

electroMedia666 commented Oct 23, 2021

Big fan of this tool, Thanks for sharing, but cannot get to recognize camera anymore.

Summary or problem
After downloading modules i start the script. No user interface is visible and I receive this error after 1 minute: "this browser does not support video capture, or this device does not have a camera" I do not get this with facetracking tool which is working fine.

When I open 'developer tools' 1 error and 3 warnings : shown in order of appearance_

Warning:

  1. Platform browser has already been set. Overwriting the platform with [object Object].
    Environment.setPlatform @ C:\Users\dante\Documents\Max 8\Packages\n4m-Bundler\n4m-handpose-master\n4m-handpose-master\node_modules@tensorflow\tfjs-core\dist\environment.js:38

  2. (electron) Security Warning: webFrame.executeJavaScript was called without worldSafeExecuteJavaScript enabled. This is considered unsafe. worldSafeExecuteJavaScript will be enabled by default in Electron 12.
    electron/js2c/renderer_init.js:15

  3. Electron Security Warning (Insecure Content-Security-Policy) This renderer process has either no Content Security electron/js2c/renderer_init.js:135 Electron Security Warning (Insecure Content-Security-Policy) This renderer process has either no Content Security. electron/js2c/renderer_init.js:135

  4. ERROR: Uncaught (in promise) DOMExecption: Could not start video source - n4m-handpose_camera.js 445

  5. WARNING: DevTools failed to load SourceMap: Could not load content for file:///C:/Users/dante/Documents/Max%208/Packages/n4m-Bundler/n4m-handpose-master/n4m-handpose-master/node_modules/ajv.js.map: _This warning occurs for every module (my guess) there are like a hundred all leading to the modules folder. _

system Windows 11, Max 8.1.11

@lysdexic-audio
Copy link
Owner

lysdexic-audio commented Oct 24, 2021 via email

@electroMedia666
Copy link
Author

I looked into it more, since its weird facetracker and posenet work and this one doesn't. Thinking maybe its a Max problem. fyi (There are duplicates of many objects in the patch program copied over each other) and the sketch,js needs to be renamed, but these don't seem to be the real problem.
Anyway, I discovered if I don't have a webcam plugged in while starting the node script it successfully loads the user interface and I was seeing the OBS load screen. Then If I run OBS and start Virtual Cam I can get the video, but if change the device drop down from 'blank' to OBS Virtual Cam then the screen goes black and it doesn't work again. Sorry I can't help more I only know some python and glsl. Hope this helps you narrow down the problem.

@redshouldrd
Copy link

Hi. Amazing project! I'm excited to experiment connecting MediaPipe tools to my Max Projects.

However, I'm having a similar problem as @electroMedia666, but on my Mac (OS 12.0.1, Max 8.1.11)
I open the patch, push the button that installs dependencies, which completes, but my camera doesn't turn on and no
data seems to be running through the patch.

Electron window that opens up is blank, and when I check it with the dev tools it lists the same first 3 errors @electroMedia666 lists above (but not error 4+5). I tried their OBS work around, and unfortunately it didn't work for me.

There aren't any errors in the Max console about video capture etc,
--However, there is one error in the Max console that says, "can't find sketch.js."
It took me a while to figure it out, but in the main window of the patch, there are 2 copies of the subpatcher "p fingerPositions" stacked on top of each other, both are patched into the same inputs and outputs.
In one of the copies (the one "underneath" the other copy), in the sub-subpatcher "drawHandToWorld" there is a js object labeled "js sketch.js" which when I click on it does not have any code in it.
...I'm not sure if this is an error that might be affecting the video window

Any suggestions?

Thank you!

@lysdexic-audio
Copy link
Owner

@redshouldrd nice catch - thanks! the old "hidden double-stacked patcher" is an easy one to miss! I've fixed that on the latest commit. Can you give it a shot?

I'll try a windows machine to see if I can repro any of @electroMedia666 's issues

@lysdexic-audio
Copy link
Owner

I just bumped electron to the latest stable release 25.0.1 which allows the script npm install script in the init subpatcher to complete. I wonder if this might solve your device issues?

can you pull the latest commits from master here and try again?

you may need to wipe your node_modules dir and package-lock.json file.

on a fresh install, MacOS 12:

Screen Shot 2023-06-05 at 2 43 35 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

3 participants