Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.
/ neko-client Public archive

Client as reusable Vue.js component for neko streaming server.

License

Notifications You must be signed in to change notification settings

demodesk/neko-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

37f93ea · Feb 21, 2024
Feb 26, 2023
Jan 26, 2024
Jan 26, 2024
Feb 21, 2024
Nov 5, 2020
Nov 5, 2020
Oct 4, 2022
Feb 26, 2021
Jul 16, 2022
Nov 5, 2020
Jan 26, 2024
Jul 18, 2022
Feb 26, 2023
Jan 26, 2024
Jan 26, 2024
Nov 5, 2020
Apr 22, 2023
Apr 28, 2023
Jan 13, 2023

Repository files navigation

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>