JSPM

  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q24903F
  • License GPL-3.0

webRTC PvP connection on Datachannel with losand

Package Exports

  • losand.pvp

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (losand.pvp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

losand.pvp

It's a usecase of losand

npm i losand.pvp

import server.js file

require("losand.pvp")(__dirname + '/public', 'index.html');

Creat a public folder and make in a index.html

You use it tags

    <script src="https://cdn.jsdelivr.net/npm/losand@0.0.71/losand.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/losand@0.0.71/dsand.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/losand.pvp@0.0.91/pvp.js"></script>
    <script>
        const peer = PvP(uri, ssl).then(c => peer = c.$(c => c.send("hello")).on({message: (e) => console.log(e.data)}));
    </script>
node server.js

and access the two clients;