Closed thammi closed 9 years ago
Issue by thammi Thursday Sep 04, 2014 at 19:43 GMT Originally opened as https://github.com/palavatv/palava-client/pull/9
I started a branch with DataChannel support. I am not sure whether the API is the best approach.
DataChannel
To create a session with one TCP-like DataChannel with the label chat do something like this:
chat
session = new palava.Session roomId: room channel: channel dataChannels: {"chat": {ordered: true}} session.on 'peer_channel_ready', (peer, name, channel) -> if name == 'chat' channel.on 'message', (data) -> console.log "Incoming chat message:", data channel.on 'close', () -> console.log "DataChannel closed" chat.send "Hello World!"
The configuration could also be moved to Session.init().
Session.init()
thammi included the following code: https://github.com/palavatv/palava-client/pull/9/commits
Was merged.
Issue by thammi Thursday Sep 04, 2014 at 19:43 GMT Originally opened as https://github.com/palavatv/palava-client/pull/9
I started a branch with
DataChannel
support. I am not sure whether the API is the best approach.To create a session with one TCP-like
DataChannel
with the labelchat
do something like this:The configuration could also be moved to
Session.init()
.thammi included the following code: https://github.com/palavatv/palava-client/pull/9/commits