mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
neko mirror
8d39a95e92
* Move congestion control to server * Address MR comments * lint. * bring back webrtc stats sync with state. * update webrtc messages. * set bitrate & video auto for signal request. * clear up bitrate & video_auto. * add bitrate and audio for connect function. * reintroduce server side congestion control if video auto is false. * mov ecode around. * fix default video_auto. * revert bitrate addition. * remove video from signal provide. --------- Co-authored-by: Aleksandar Sukovic <aleksandar.sukovic@gmail.com> |
||
---|---|---|
.github/workflows | ||
.vscode | ||
dev | ||
src | ||
.babelrc | ||
.editorconfig | ||
.eslintrc | ||
.gitattributes | ||
.gitignore | ||
.prettierrc | ||
Dockerfile | ||
LICENSE | ||
package-lock.json | ||
package.json | ||
README.md | ||
tsconfig.json | ||
types-build.sh | ||
types-tsconfig.json | ||
vue.config.js |
neko-client
Connect to demodesk/neko backend with self contained vue component.
For community edition neko with GUI and plug & play deployment visit m1k1o/neko.
Installation
Code is published to public NPM registry and GitHub npm repository.
# npm command
npm i @demodesk/neko
# yarn command
yarn add @demodesk/neko
Build
You can set keyboard provider at build time, either novnc
or the default guacamole
.
# by default uses guacamole keyboard
npm run build
# uses novnc keyboard
KEYBOARD=novnc npm run build
Example
API consists of accessing Vue reactive state, calling various methods and subscribing to events. Simple usage:
<!-- import vue -->
<script src="https://unpkg.com/vue"></script>
<!-- import neko -->
<script src="./neko.umd.js"></script>
<link rel="stylesheet" href="./neko.css">
<div id="app">
<neko ref="neko" server="http://127.0.0.1:3000/api" autologin autoplay />
</div>
<script>
new Vue({
components: { neko },
mounted() {
// access state
// this.$refs.neko.state.session_id
// call methods
// this.$refs.neko.setUrl('http://127.0.0.1:3000/api')
// this.$refs.neko.login('username', 'password')
// this.$refs.neko.logout()
// subscribe to events
// this.$refs.neko.events.on('room.control.host', (id) => { })
},
}).$mount('#app')
</script>