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

Can't Get Data On 'Frame' Event #27

Closed
axwaxw opened this issue Dec 4, 2020 · 1 comment
Closed

Can't Get Data On 'Frame' Event #27

axwaxw opened this issue Dec 4, 2020 · 1 comment

Comments

@axwaxw
Copy link

axwaxw commented Dec 4, 2020

Per my comment here, I am not able to get data on the frame event.

Code to reproduce this issue (on Raspberry Pi running node js)

const { StreamCamera, Codec } = require("pi-camera-connect");

const streamCamera = new StreamCamera({
  codec: Codec.MJPEG
});

const videoStream = streamCamera.createStream();

await streamCamera.startCapture();

videoStream.on("frame", data => console.log("New frame", data));

// NOTHING IN CONSOLE?

// Wait 5 seconds
await new Promise(resolve => setTimeout(() => resolve(), 5000));

await streamCamera.stopCapture();

Thanks

@axwaxw axwaxw closed this as completed Dec 4, 2020
@axwaxw
Copy link
Author

axwaxw commented Dec 4, 2020

Added comment to existing frame issue

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

No branches or pull requests

1 participant