mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 08:45:38 +02:00
✨ feat: Add streaming support (#125)
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>
This commit is contained in:
20
packages/moq/transfork/error.ts
Normal file
20
packages/moq/transfork/error.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
export class Closed extends Error {
|
||||
readonly code?: number
|
||||
|
||||
constructor(code?: number) {
|
||||
super(`closed code=${code}`)
|
||||
this.code = code
|
||||
}
|
||||
|
||||
static from(err: unknown): Closed {
|
||||
return new Closed(Closed.extract(err))
|
||||
}
|
||||
|
||||
static extract(err: unknown): number {
|
||||
if (err instanceof WebTransportError && err.streamErrorCode !== null) {
|
||||
return err.streamErrorCode
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user