Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/huruji/minicap-driver
轻松实现电脑浏览器实时投影 android 设备,并保证高帧率
https://github.com/huruji/minicap-driver
Last synced: 3 months ago
JSON representation
轻松实现电脑浏览器实时投影 android 设备,并保证高帧率
- Host: GitHub
- URL: https://github.com/huruji/minicap-driver
- Owner: huruji
- Created: 2019-07-28T08:33:20.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-04T07:08:50.000Z (over 5 years ago)
- Last Synced: 2024-07-13T06:36:38.326Z (4 months ago)
- Language: TypeScript
- Homepage:
- Size: 11.4 MB
- Stars: 6
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-github-star - minicap-driver
README
## minicap-driver
一个对 [minicap](https://github.com/openstf/minicap) 的 node.js 封装,让开发人员不需要关注 minicap 的底层原理 websocket 的处理,更加轻松实现 Android 设备投影到浏览器,并保证高帧率。
![](./shot.gif)
**server side**
```js
import * as minicapDriver from 'minicap-driver'
import { Server as WebSocketServer } from 'ws'const wss = new WebSocketServer({ port: 9002 })
;(async () => {
await minicapDriver.init()
wss.on('connection', async ws => {
console.log('conncetion')
await minicapDriver.start(ws)
})
})()
```**client side** just like this:
```js
import { minicapClient } from 'minicap-driver/dist/client'minicapClient('ws://localhost:9002', '#canvas')
```就是这么简单,例子可以看example