{"id":21992379,"url":"https://github.com/josttim/cameracquire","last_synced_at":"2026-04-13T01:40:50.345Z","repository":{"id":258644663,"uuid":"867151636","full_name":"JostTim/cameracquire","owner":"JostTim","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-21T11:39:27.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-21T15:19:34.685Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/JostTim.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-03T14:39:11.000Z","updated_at":"2024-10-21T11:39:31.000Z","dependencies_parsed_at":"2024-10-22T11:15:06.841Z","dependency_job_id":null,"html_url":"https://github.com/JostTim/cameracquire","commit_stats":null,"previous_names":["josttim/cameracquire"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JostTim/cameracquire","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JostTim%2Fcameracquire","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JostTim%2Fcameracquire/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JostTim%2Fcameracquire/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JostTim%2Fcameracquire/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JostTim","download_url":"https://codeload.github.com/JostTim/cameracquire/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JostTim%2Fcameracquire/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31736723,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-12T22:19:12.206Z","status":"ssl_error","status_checked_at":"2026-04-12T22:18:33.088Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-11-29T20:13:37.850Z","updated_at":"2026-04-13T01:40:50.316Z","avatar_url":"https://github.com/JostTim.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cameracquire\n\n\n## Todo : \n\nImplement a WebSocket for video streaming (more reliable):\n\n\nWebSockets provide a full-duplex communication channel over a single, long-lived connection between a client and a server. This is useful for applications that require real-time data updates, such as live video streaming, chat applications, or online gaming.\n\nTo implement WebSockets in your application, we can use a library like Flask-SocketIO for the server side and the native WebSocket API in JavaScript for the client side. Here's a basic example of how we might set this up:\n\nServer-Side (Flask with Flask-SocketIO)\nInstall Flask-SocketIO:\n\n``npm add flask-socketio``\n\nSet up the Flask application with WebSocket support:\n\n```Python\nfrom flask import Flask, render_template\nfrom flask_socketio import SocketIO, emit\n\napp = Flask(__name__)\nsocketio = SocketIO(app)\n\n@app.route('/')\ndef index():\n    return render_template('index.html')\n\n@socketio.on('connect')\ndef handle_connect():\n    print('Client connected')\n    # You can start sending frames here\n    # emit('frame', {'data': 'frame data'})\n\n@socketio.on('disconnect')\ndef handle_disconnect():\n    print('Client disconnected')\n\nif __name__ == '__main__':\n    socketio.run(app, debug=True)\n\n```\n\nClient-Side (JavaScript)\nInclude the Socket.IO client library in your HTML:\n\n\n```Html\n\u003cscript src=\"https://cdn.socket.io/4.0.0/socket.io.min.js\"\u003e\u003c/script\u003e\nSet up the WebSocket connection:\n\nTsx\nInsert code\n\ndocument.addEventListener('DOMContentLoaded', function() {\n    const socket = io();\n\n    socket.on('connect', function() {\n        console.log('Connected to server');\n    });\n\n    socket.on('frame', function(data) {\n        // Handle incoming frame data\n        console.log('Received frame:', data);\n        // Update the image source or handle the frame data as needed\n    });\n\n    socket.on('disconnect', function() {\n        console.log('Disconnected from server');\n    });\n});\n```\n\n\nExplanation\nServer-Side: The Flask application uses Flask-SocketIO to handle WebSocket connections. When a client connects, we can start emitting frames or other data to the client.\n\nClient-Side: The JavaScript code establishes a WebSocket connection to the server using the Socket.IO client library. It listens for events like connect, frame, and disconnect to handle the connection lifecycle and incoming data.\n\nThis setup allows us to send real-time data from the server to the client efficiently. We can modify the emit calls to send actual video frames or other data as needed for your application.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosttim%2Fcameracquire","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosttim%2Fcameracquire","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosttim%2Fcameracquire/lists"}