{"id":13743886,"url":"https://github.com/jcmellado/flashcam","last_synced_at":"2025-05-09T02:31:44.125Z","repository":{"id":29466862,"uuid":"33003413","full_name":"jcmellado/flashcam","owner":"jcmellado","description":"Webcam video capture, from ActionScript to JavaScript","archived":true,"fork":false,"pushed_at":"2015-03-27T18:53:31.000Z","size":144,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-15T15:41:03.491Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"ActionScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcmellado.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-27T18:48:50.000Z","updated_at":"2023-01-03T10:46:52.000Z","dependencies_parsed_at":"2022-09-07T08:03:59.774Z","dependency_job_id":null,"html_url":"https://github.com/jcmellado/flashcam","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/jcmellado%2Fflashcam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcmellado%2Fflashcam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcmellado%2Fflashcam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcmellado%2Fflashcam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcmellado","download_url":"https://codeload.github.com/jcmellado/flashcam/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253177742,"owners_count":21866390,"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":"2024-08-03T05:00:59.024Z","updated_at":"2025-05-09T02:31:43.884Z","avatar_url":"https://github.com/jcmellado.png","language":"ActionScript","funding_links":[],"categories":["File Formats"],"sub_categories":["JavaScript"],"readme":"Capture video on Flash so you can use it from JavaScript using ExternalInterface.\r\n\r\n### Demo ###\r\n\r\nTry the [live demo](http://www.inmensia.com/files/flashcam/demo/demo.html)!\r\n\r\n### How to use it? ###\r\n\r\nThe library calls the `cameraUnmuted` JavaScript function when the user \"unmutes\" webcam on Flash:\r\n\r\n```\r\nvar camera, canvas, context, imageData, pixels;\r\n\r\nfunction cameraUnmuted(){\r\n  camera = document.getElementById(\"flashcam\");\r\n  canvas = document.getElementById(\"canvas\");\r\n  context = canvas.getContext(\"2d\");\r\n  imageData = context.getImageData(0, 0, canvas.width, canvas.height);\r\n}\r\n```\r\n\r\nThen the `snapshot` function of the `camera` object can be called anytime to get the image data:\r\n\r\n```\r\nfunction snapshot(){\r\n  var image = imageData.data, i = 0, j = 0, pixel = 0, len;\r\n\r\n  pixels = camera.snapshot().split(\",\");\r\n\r\n  len = pixels.length - 1;\r\n  while(len --){\r\n    pixel += parseInt( pixels[j ++], 36);\r\n\r\n    image[i ++] = pixel \u003e\u003e 16;\r\n    image[i ++] = (pixel \u003e\u003e 8) \u0026 0xff;\r\n    image[i ++] = pixel \u0026 0xff;\r\n    image[i ++] = 255;\r\n  }\r\n\r\n  context.putImageData(imageData, 0, 0);\r\n}\r\n```\r\n\r\n### Security Issue ###\r\n\r\nYou probably need to visit the Flash settings on the Global Security Panel to run the demo on your local hard drive.\r\n\r\nSearch \"flash global security settings\" on Google to get more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcmellado%2Fflashcam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcmellado%2Fflashcam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcmellado%2Fflashcam/lists"}