Skip to content

Files

Latest commit

author
ARSA
Dec 20, 2017
624e3d6 · Dec 20, 2017

History

History
39 lines (27 loc) · 609 Bytes

README.md

File metadata and controls

39 lines (27 loc) · 609 Bytes

webrtc

isomorphic package for WebRTC

  • WebRTC wrapper for native(github.com/keroserene/go-webrtc)
  • WebRTC wrapper for GopherJS

dependencies for native

  • brew install pkg-config
  • go get -u github.com/keroserene/go-webrtc

dependencies for gopherjs

  • go get -u github.com/gopherjs/gopherjs

install

go get -u github.com/arsasm/webrtc

usage

getUserMedia sample(gopherjs only)

package main

import "github.com/arsasm/webrtc"

func main() {
	stream, err := webrtc.GetUserMedia(webrtc.NewConstraints(true, true))
	if err != nil {
		log.Println(err)
		return
	}
    ...
}