mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 08:45:38 +02:00
This adds: - [x] Keyboard and mouse handling on the frontend - [x] Video and audio streaming from the backend to the frontend - [x] Input server that works with Websockets Update - 17/11 - [ ] Master docker container to run this - [ ] Steam runtime - [ ] Entrypoint.sh --------- Co-authored-by: Kristian Ollikainen <14197772+DatCaptainHorse@users.noreply.github.com> Co-authored-by: Kristian Ollikainen <DatCaptainHorse@users.noreply.github.com>
12 lines
292 B
TypeScript
12 lines
292 B
TypeScript
export function decode(str: string): Uint8Array {
|
|
const bytes = new Uint8Array(str.length / 2)
|
|
for (let i = 0; i < bytes.length; i += 1) {
|
|
bytes[i] = Number.parseInt(str.slice(2 * i, 2 * i + 2), 16)
|
|
}
|
|
return bytes
|
|
}
|
|
|
|
export function encode(_bytes: Uint8Array): string {
|
|
throw "todo"
|
|
}
|