Render camera preview in Chrome using Native Clien

2019-08-23 08:10发布

I'm trying to write ppapi plugin for Chrome which will use webcam (show preview and write file). I have installed NaCl sdk with pepper_35. There available examples in /examples/api/ folder: media_stream_audio and media_stream_video.

The audio example works fine - requests access to microphone and shows some kind of preview.

The "media_stream_video" example must show web-camera video preview, but when I load example on the local web server (with make serve command), there appears red rect, and Chrome asks for the web camera access. When I click “allow” - webcam indicator lights-up, chrome show that web page uses the web camera, and I see the camera settings icon. But the preview doesn't work, there still red rectangle instead.

I checked this on Windows 8.1, Windows 7 and Mac OS X, with five different webcams, and have no idea what can be wrong.

Maybe someone already encountered with the same problem?

1条回答
欢心
2楼-- · 2019-08-23 08:46

Installing the pepper_37(dev) version of NaCl SDK solved the problem. Looks like it is unstable version currently, but it works.

查看更多
登录 后发表回答