{"id":26665509,"url":"https://github.com/elsehow/chunky-webcam","last_synced_at":"2025-03-25T17:37:24.156Z","repository":{"id":46428493,"uuid":"52708542","full_name":"elsehow/chunky-webcam","owner":"elsehow","description":"upload a webcam stream by recording chunks and sending them, as binary blobs, to a socket.io server","archived":false,"fork":false,"pushed_at":"2021-10-14T19:04:42.000Z","size":6,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-15T07:13:44.283Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elsehow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-28T06:40:03.000Z","updated_at":"2021-10-14T19:04:44.000Z","dependencies_parsed_at":"2022-09-10T20:42:17.649Z","dependency_job_id":null,"html_url":"https://github.com/elsehow/chunky-webcam","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsehow%2Fchunky-webcam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsehow%2Fchunky-webcam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsehow%2Fchunky-webcam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsehow%2Fchunky-webcam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elsehow","download_url":"https://codeload.github.com/elsehow/chunky-webcam/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245511401,"owners_count":20627386,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-25T17:37:23.397Z","updated_at":"2025-03-25T17:37:24.122Z","avatar_url":"https://github.com/elsehow.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chunky webcam \n\nsend .webm recordings from a webcam stream, in chunks of user-specified time, to a socket.io server\n\n## installation\n\n    npm install chunky-webcam\n\n## usage\n\n\n```javascript\nvar chunky = require('../index.js')\n  , getUserMedia = require('get-user-media')\n\n// get user webcam\ngetUserMedia({ video: true, audio: false}, (err, stream) =\u003e {\n\n    // setup chunky-webcam, with our stream\n    // it will record 1000ms chunks,\n    // and send them with a 'video' event to 'localhost:9999'\n    // where our server runs\n    chunk = chunky(stream, 1000, 'localhost:9999')\n\n    console.log('chunky-webcam', chunk)\n\n    // let's say our server will send 'data' events\n    chunk.socket.on('data', data =\u003e {\n        // we will add them to our msg element\n        console.log('heard from server!', data)\n    })\n})\n```\n*see `examples/` for a robust client/server example.*\n\n## api\n\n### var chunk = chunky(webcam_stream, chunk_duration_ms, uri)\n\nstart sending .webm files of length `chunk_duration_ms` to a socket.io server `uri`\n\ntakes a [webcam media stream](https://developer.mozilla.org/en-US/docs/Web/API/Media_Streams_API).\n\nthe client will emit `'video'` events over the socket.io connection, each containing binary blobs of the video\n\n### chunk.socket\n\nthe underlying socket.io connection.\n\nuse this to, for example, subscribe to events coming from your socket.io server.\nor to emit other kinds of events to this server.\n\n## license\n\nBSD\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felsehow%2Fchunky-webcam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felsehow%2Fchunky-webcam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felsehow%2Fchunky-webcam/lists"}