File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ This example demonstrates how to stream to a Janus video-room using pion-WebRTC
27
27
run ` main.go ` in ` github.com/pions/webrtc/examples/janus-gateway/video-room `
28
28
29
29
OSX
30
- ``` sh
30
+ ``` sh
31
31
brew install pkg-config
32
32
https://gstreamer.freedesktop.org/data/pkg/osx/
33
33
Original file line number Diff line number Diff line change 4
4
"fmt"
5
5
"log"
6
6
"math/rand"
7
+ "time"
7
8
8
9
janus "github.com/notedit/janus-go"
9
10
"github.com/pions/webrtc"
@@ -99,6 +100,16 @@ func main() {
99
100
panic (err )
100
101
}
101
102
103
+ go func () {
104
+ for {
105
+ if _ , keepAliveErr := session .KeepAlive (); err != nil {
106
+ panic (keepAliveErr )
107
+ }
108
+
109
+ time .Sleep (5 * time .Second )
110
+ }
111
+ }()
112
+
102
113
go watchHandle (handle )
103
114
104
115
_ , err = handle .Message (map [string ]interface {}{
You can’t perform that action at this time.
0 commit comments