datachannel-client
v1.0.2
Published
Reliable signaling implementation for DataChannel.js
Downloads
14
Maintainers
Readme
DataChannel.js client using Reliable Signaler
It is a node.js and socket.io based reliable signaling implementation for DataChannel.js.
# install
npm install datachannel-client
# run
node ./node_modules/datachannel-client/server.js
Now open localhost port:8080
.
How it works?
- You can store a room-id on server using
createNewRoomOnServer
method. - You can get that room-id using
getRoomFromServer
method.
How to use?
- In your Node.js server, invoke
require('reliable-signaler')
and pass HTTP-Server object. - In your HTML file, link this script:
/reliable-signaler/signaler.js
- In your
<script>
tag, invokeinitReliableSignaler
constructor. - Invoke
createNewRoomOnServer
method for room-moderator. - Invoke
getRoomFromServer
method from room-participants (multiple participants).
Source code of this demo is available here:
- https://github.com/muaz-khan/Reliable-Signaler/tree/master/datachannel-client
License
datachannel-client is released under MIT licence . Copyright (c) Muaz Khan.