added setup files
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,5 +1,5 @@
|
||||
config.json
|
||||
env/
|
||||
remotegameplay
|
||||
rooms.json
|
||||
room.json
|
||||
laplace
|
||||
@@ -1,14 +0,0 @@
|
||||
# Remote game play
|
||||
The aim of this project is develop a WebRTC screenshare designed for streaming video games and
|
||||
accpeting remote inputs.
|
||||
There will be ansible intrcutions which can be executed inside into any virtual environment. This will
|
||||
a plugin which complements the project [P2PRC](https://p2prc.akilan.io)
|
||||
|
||||
## Laplace Binary
|
||||
The laplace binary is generated from the fork:
|
||||
https://github.com/Akilan1999/laplace/tree/keyboard_mouse
|
||||
|
||||
## Running Laplace headless
|
||||
```
|
||||
chromium --auto-select-desktop-capture-source=Entire screen --url https://0.0.0.0:8888/?mode=headless
|
||||
```
|
||||
20
main.go
20
main.go
@@ -21,6 +21,9 @@ func main() {
|
||||
keyFile := flag.String("keyFile", "files/server.key", "TLS key file")
|
||||
headless := flag.Bool("headless", false, "Creating screenshare using headless mode")
|
||||
roomInfo := flag.Bool("roomInfo", false, "Getting room id of headless server")
|
||||
killServer := flag.Bool("killServer", false, "Kills the laplace")
|
||||
killChromium := flag.Bool("killChromium", false, "Kills all chromuim")
|
||||
|
||||
flag.Parse()
|
||||
|
||||
// Action performed when the config file is called
|
||||
@@ -54,6 +57,23 @@ func main() {
|
||||
return
|
||||
|
||||
}
|
||||
// kills laplace server
|
||||
if *killServer {
|
||||
cmd := exec.Command("pkill" ,"laplace")
|
||||
if err := cmd.Run(); err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
return
|
||||
}
|
||||
// kills chromium server
|
||||
if *killChromium {
|
||||
cmd := exec.Command("pkill" ,"chromium")
|
||||
if err := cmd.Run(); err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if *tls {
|
||||
log.Println("Listening on TLS:", *addr)
|
||||
|
||||
Reference in New Issue
Block a user