{"id":13672895,"url":"https://github.com/huruji/minicap-driver","last_synced_at":"2025-04-10T16:12:18.942Z","repository":{"id":97309950,"uuid":"199262256","full_name":"huruji/minicap-driver","owner":"huruji","description":"轻松实现电脑浏览器实时投影 android 设备，并保证高帧率","archived":false,"fork":false,"pushed_at":"2019-08-04T07:08:50.000Z","size":11998,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T08:16:31.507Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/huruji.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}},"created_at":"2019-07-28T08:33:20.000Z","updated_at":"2023-03-13T14:02:23.000Z","dependencies_parsed_at":"2023-08-01T13:45:39.701Z","dependency_job_id":null,"html_url":"https://github.com/huruji/minicap-driver","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"86b1f032bd33e07e6b8200d3a67034edfcf08b94"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huruji%2Fminicap-driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huruji%2Fminicap-driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huruji%2Fminicap-driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huruji%2Fminicap-driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huruji","download_url":"https://codeload.github.com/huruji/minicap-driver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248251110,"owners_count":21072685,"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-02T09:01:55.504Z","updated_at":"2025-04-10T16:12:18.912Z","avatar_url":"https://github.com/huruji.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"## minicap-driver\n\n一个对 [minicap](https://github.com/openstf/minicap) 的 node.js 封装，让开发人员不需要关注 minicap 的底层原理 websocket 的处理，更加轻松实现 Android 设备投影到浏览器，并保证高帧率。\n\n![](./shot.gif)\n\n**server side**\n\n```js\n\nimport * as minicapDriver from 'minicap-driver'\nimport { Server as WebSocketServer } from 'ws'\n\nconst wss = new WebSocketServer({ port: 9002 })\n\n;(async () =\u003e {\n\tawait minicapDriver.init()\n\twss.on('connection', async ws =\u003e {\n\t\tconsole.log('conncetion')\n\t\tawait minicapDriver.start(ws)\n\t})\n})()\n```\n\n**client side** just like this:\n\n```js\nimport { minicapClient } from 'minicap-driver/dist/client'\n\nminicapClient('ws://localhost:9002', '#canvas')\n```\n\n就是这么简单，例子可以看example","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuruji%2Fminicap-driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuruji%2Fminicap-driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuruji%2Fminicap-driver/lists"}