WebRTC demo
JavaScript
Switch branches/tags
Nothing to show
Latest commit f7b7ce3 Jan 31, 2013 @Raynos Update README.md
Permalink
Failed to load latest commit information.
example bumped versions Aug 24, 2012
lib api sugar Aug 19, 2012
.gitignore initial Aug 16, 2012
LICENCE initial Aug 16, 2012
README.md Update README.md Jan 31, 2013
browser.js bug fixes Aug 24, 2012
package.json 0.5.0 Aug 24, 2012

README.md

webrtc-stream

Stream video and audio

Example

See example folder for more details

var WebRTC = require("webrtc-stream")
    , MediaStream = WebRTC.MediaStream
    , WebRTCStreams = WebRTC.WebRTCStreams
    , DiscoveryNetwork = require("discovery-network")
    , Connection = DiscoveryNetwork.Connection

var localVideo = document.getElementById("local-webrtc")
    , remoteVideos = document.getElementById("remote-videos")

MediaStream.local(localVideo, function (myMediaStream) {
    var conn = Connection("http://discoverynetwork.co/service")
        
    WebRTCStreams(conn, "mediaStreams-demo", myMediaStream, renderStream)

    function renderStream(remotePeerId, stream) {
        var remoteVideo = document.createElement("video")
        remoteVideo.autoplay = true
        remoteVideos.appendChild(remoteVideo)
        MediaStream.remote(remoteVideo, stream)
    }
})

Contributors

  • Raynos

MIT Licenced