Skip to content
Create a gist now

Instantly share code, notes, and snippets.

A little example to get plava client library started.
<!DOCTYPE html>
<meta charset="utf-8" />
<title>Meine erste Videoapplikation</title>
<script src=""></script>
<script src=""></script>
<script src=""></script>
<script type="text/coffeescript">
channel = new palava.WebSocketChannel('wss://')
session = new palava.Session
roomId: "test"
channel: channel
session.on 'local_stream_ready', (stream) ->
palava.browser.attachMediaStream($('#myvideo'), stream)
session.on 'peer_stream_ready', (peer) ->
if peer.isLocal()
if $('#' + > 0
element = $('#' +
element = $('<li id="' + + '"><video autoplay></video></li>')
palava.browser.attachMediaStream(element.children('video')[0], peer.getStream())
session.on 'peer_left', (peer) ->
$('#' +
identity: new palava.Identity
audio: true
video: true
stun: ''
joinTimeout: 500
<script type="text/javascript" src=""></script>
<h2>Mein Video</h2>
<video id="myvideo" autoplay></video>
<h2>Andere Videos:</h2>
<ul id="others"></ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.