From 475db9e3aba432213eaaaa7de4fbd9d29ee01fc8 Mon Sep 17 00:00:00 2001 From: giongto35 Date: Thu, 4 Apr 2019 02:42:03 +0800 Subject: [PATCH] Update docker file --- Dockerfile | 2 ++ main.go | 13 ------------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index b11a41bb..04f678bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,5 +4,7 @@ RUN mkdir -p /go/src/github.com/giongto35/game-online COPY . /go/src/github.com/giongto35/game-online/ # Install server dependencies +RUN apt-get install portaudio19-dev RUN go get github.com/pions/webrtc RUN go get github.com/gordonklaus/portaudio +RUN go get github.com/gorilla/mux diff --git a/main.go b/main.go index b73b988f..a11a6948 100644 --- a/main.go +++ b/main.go @@ -3,10 +3,8 @@ package main import ( "fmt" "image" - "image/color" "io/ioutil" "log" - "math/rand" "net/http" "time" @@ -68,17 +66,6 @@ func postSession(w http.ResponseWriter, r *http.Request) { w.Write([]byte(localSession)) } -func randomImage(width, height int) *image.RGBA { - img := image.NewRGBA(image.Rectangle{image.Point{0, 0}, image.Point{width, height}}) - for x := 0; x < width; x++ { - for y := 0; y < height; y++ { - img.Set(x, y, color.RGBA{uint8(rand.Int31n(0xff)), uint8(rand.Int31n(0xff)), uint8(rand.Int31n(0xff)), 0xff - 1}) - } - } - - return img -} - func screenshotLoop(imageChannel chan *image.RGBA) { for image := range imageChannel { if webRTC.IsConnected() {