{"action":"created","issue":{"url":"https://api.github.com/repos/tessel/tessel-av/issues/8","repository_url":"https://api.github.com/repos/tessel/tessel-av","labels_url":"https://api.github.com/repos/tessel/tessel-av/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/tessel/tessel-av/issues/8/comments","events_url":"https://api.github.com/repos/tessel/tessel-av/issues/8/events","html_url":"https://github.com/tessel/tessel-av/issues/8","id":146725389,"number":8,"title":"No 'data' event on camera in stream mode","user":{"login":"josser","id":103639,"avatar_url":"https://avatars.githubusercontent.com/u/103639?v=3","gravatar_id":"","url":"https://api.github.com/users/josser","html_url":"https://github.com/josser","followers_url":"https://api.github.com/users/josser/followers","following_url":"https://api.github.com/users/josser/following{/other_user}","gists_url":"https://api.github.com/users/josser/gists{/gist_id}","starred_url":"https://api.github.com/users/josser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josser/subscriptions","organizations_url":"https://api.github.com/users/josser/orgs","repos_url":"https://api.github.com/users/josser/repos","events_url":"https://api.github.com/users/josser/events{/privacy}","received_events_url":"https://api.github.com/users/josser/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"rwaldron","id":27985,"avatar_url":"https://avatars.githubusercontent.com/u/27985?v=3","gravatar_id":"","url":"https://api.github.com/users/rwaldron","html_url":"https://github.com/rwaldron","followers_url":"https://api.github.com/users/rwaldron/followers","following_url":"https://api.github.com/users/rwaldron/following{/other_user}","gists_url":"https://api.github.com/users/rwaldron/gists{/gist_id}","starred_url":"https://api.github.com/users/rwaldron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwaldron/subscriptions","organizations_url":"https://api.github.com/users/rwaldron/orgs","repos_url":"https://api.github.com/users/rwaldron/repos","events_url":"https://api.github.com/users/rwaldron/events{/privacy}","received_events_url":"https://api.github.com/users/rwaldron/received_events","type":"User","site_admin":false},"assignees":[{"login":"rwaldron","id":27985,"avatar_url":"https://avatars.githubusercontent.com/u/27985?v=3","gravatar_id":"","url":"https://api.github.com/users/rwaldron","html_url":"https://github.com/rwaldron","followers_url":"https://api.github.com/users/rwaldron/followers","following_url":"https://api.github.com/users/rwaldron/following{/other_user}","gists_url":"https://api.github.com/users/rwaldron/gists{/gist_id}","starred_url":"https://api.github.com/users/rwaldron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwaldron/subscriptions","organizations_url":"https://api.github.com/users/rwaldron/orgs","repos_url":"https://api.github.com/users/rwaldron/repos","events_url":"https://api.github.com/users/rwaldron/events{/privacy}","received_events_url":"https://api.github.com/users/rwaldron/received_events","type":"User","site_admin":false}],"milestone":null,"comments":23,"created_at":"2016-04-07T19:50:01Z","updated_at":"2016-08-21T17:02:16Z","closed_at":"2016-04-25T14:36:38Z","body":"Hi! \r\nI'm trying to run examples from readme.md but something is wrong and I can't figure out where exactly. \r\n\r\nSo, i'm running this code (taken from examples + added console.log's): \r\n\r\n```javascript\r\nvar express = require('express');\r\nvar app = express();\r\nvar server = require('http').Server(app);\r\nvar io = require('socket.io')(server);\r\nvar os = require('os');\r\nvar path = require('path');\r\nvar cp = require('child_process');\r\nvar port = 8080;\r\n\r\nvar av = require('tessel-av');\r\n\r\nserver.listen(port, function () {\r\n  console.log(`http://${os.hostname()}.local:${port}`);\r\n});\r\n\r\napp.use(express.static(path.join(__dirname, '/public')));\r\n\r\nio.on('connection', (socket) => {\r\n  var camera = new av.Camera();\r\n  console.log('created camera');\r\n  socket.on('ready', () => { \r\n    camera.stream(); \r\n    console.log('socket ready');\r\n  });\r\n  camera.on('data', (data) => {\r\n    console.log('on camera data')\r\n    socket.emit('image', data.toString('base64'));\r\n  });\r\n});\r\n\r\nprocess.on(\"SIGINT\", _ => server.close());\r\n```\r\n\r\nAnd I see all console.logs except 'on camera data', so I think sockets is working fine (also no errors in browser console) but camera is not emitting 'data' event. \r\nWebcamera is working because another example with .capture -> send via simple http is working fine. \r\n\r\nAnother small question: why default settings for capture is limited to 320x240, I have logitech c240 which is 720p webcam. So it would be great to have ability to capture bigger images. \r\n\r\nThank you and sorry for my bad english )"},"comment":{"url":"https://api.github.com/repos/tessel/tessel-av/issues/comments/241268970","html_url":"https://github.com/tessel/tessel-av/issues/8#issuecomment-241268970","issue_url":"https://api.github.com/repos/tessel/tessel-av/issues/8","id":241268970,"user":{"login":"Arrow7000","id":13225609,"avatar_url":"https://avatars.githubusercontent.com/u/13225609?v=3","gravatar_id":"","url":"https://api.github.com/users/Arrow7000","html_url":"https://github.com/Arrow7000","followers_url":"https://api.github.com/users/Arrow7000/followers","following_url":"https://api.github.com/users/Arrow7000/following{/other_user}","gists_url":"https://api.github.com/users/Arrow7000/gists{/gist_id}","starred_url":"https://api.github.com/users/Arrow7000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arrow7000/subscriptions","organizations_url":"https://api.github.com/users/Arrow7000/orgs","repos_url":"https://api.github.com/users/Arrow7000/repos","events_url":"https://api.github.com/users/Arrow7000/events{/privacy}","received_events_url":"https://api.github.com/users/Arrow7000/received_events","type":"User","site_admin":false},"created_at":"2016-08-21T17:02:16Z","updated_at":"2016-08-21T17:02:16Z","body":"@rwaldron yes that is the same camera. \r\n\r\nSo I can in fact take pictures with it, I tried it with this script: \r\n\r\n```\r\nvar av = require('tessel-av');\r\nvar os = require('os');\r\nvar http = require('http');\r\nvar port = 8080;\r\nvar camera = new av.Camera();\r\n\r\nhttp.createServer((request, response) => {\r\n  response.writeHead(200, { 'Content-Type': 'image/jpg' });\r\n\r\n  camera.capture().pipe(response);\r\n\r\n}).listen(port, () => console.log(`http://${os.hostname()}.local:${port}`));\r\n```\r\n\r\nand that does result in a picture whenever I visit the browser, like this one: \r\n\r\n![tesselimg](https://cloud.githubusercontent.com/assets/13225609/17838611/5b1d7f8a-67c9-11e6-9845-7ca508f0b026.jpg)\r\n"}}
{"actor":{"display_login":"Arrow7000"}}