UNPKG

peermesh

Version:

Send files peer-to-peer over a mesh network built with WebRTC.

16 lines (10 loc) 382 B
var d = require( './src/dispatcher')() //var debug = require('debug') localStorage.debug = '' var locationHash = location.hash.substr(1) if (locationHash) d.emit( 'hash', locationHash) else d.emit( 'noHash') document.getElementById( 'send').onchange = e => d.emit( 'fileAdded', e.target.files[0]) document.getElementById( 'newMesh').onclick = e => d.emit( 'startNewMesh')