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:
32
packages/relay/main.go
Normal file
32
packages/relay/main.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
"os/signal"
|
||||
relay "relay/internal"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var err error
|
||||
stopCh := make(chan os.Signal, 1)
|
||||
signal.Notify(stopCh, os.Interrupt, syscall.SIGTERM)
|
||||
|
||||
// Get flags and log them
|
||||
relay.InitFlags()
|
||||
relay.GetFlags().DebugLog()
|
||||
|
||||
// Init WebRTC API
|
||||
err = relay.InitWebRTCAPI()
|
||||
if err != nil {
|
||||
log.Fatal("Failed to initialize WebRTC API: ", err)
|
||||
}
|
||||
|
||||
// Start our HTTP endpoints
|
||||
relay.InitHTTPEndpoint()
|
||||
|
||||
// Wait for exit signal
|
||||
<-stopCh
|
||||
log.Println("Shutting down gracefully by signal...")
|
||||
}
|
||||
Reference in New Issue
Block a user