Comments (6)
Yes, just download the project on each machine and open the html file in a browser
from serverless-webrtc.
What are the limitations? Do they need to be on the same network? Or does this also work over internet? Any other limitations?
from serverless-webrtc.
How does speed compare to Web sockets for streaming data? Have you compared by chance?
from serverless-webrtc.
Why not just try it?
WebRTC datachannels are faster than websockets in the sense that WebRTC supports UDP and websockets only support TCP. So if you're building something that wants UDP-like behavior, like streaming movies or multiplayer games, you would probably prefer WebRTC.
from serverless-webrtc.
I just gave it a shot. I don't see where I get the "answer" from. On the first tab, I type "hello" in the box after hitting "create" server. Then it shows a box to input the "answer". Then in the second tab I hit "join", and type "hello" in the box. I don't see where to get the answer.
from serverless-webrtc.
@trusktr You need to wait a while after hitting "create" server to see the "offer text" show up in the textarea (it's not for inputting any text).
It took me a while to aware the time needed for ICE by comparing the code for browser and node.js.
pc1.onicecandidate = function (e) {
console.log('ICE candidate (pc1)', e)
if (e.candidate == null) {
$('#localOffer').html(JSON.stringify(pc1.localDescription))
}
}
pc.onicecandidate = function(candidate) {
// Firing this callback with a null candidate indicates that
// trickle ICE gathering has finished, and all the candidates
// are now present in pc.localDescription. Waiting until now
// to create the answer saves us from having to send offer +
// answer + iceCandidates separately.
if (candidate.candidate == null) {
doShowAnswer();
}
}
In your case, in a closed network, you can delete iceServers from var cfg = {'iceServers': [{'url': 'stun:23.21.150.121'}]} to make offer text generation instant.
@cjb I think it will be better to update the text
"Here's your "offer" -- it tells someone else how to connect to you. Send the whole thing to them, for example in an instant message or e-mail."
into something like
"Wait your "offer" JSON text show up (It may take a while). Then copy/paste and send the text to the peer you want to connect. "
Also make the textarea read only...
Also add a waiting animation...
BTW, this project is a good example to understand WebRTC. Thanks!
from serverless-webrtc.
Related Issues (20)
- Not working in Firefox 38 HOT 2
- Demo is not working HOT 11
- How would you build other clients? HOT 3
- using STUN? HOT 2
- How to actually make it nice HOT 8
- Text only version? HOT 3
- Issue Error: Invalid call to createOffer HOT 3
- Chromium Works But Doesn't HOT 1
- Cannot create or join room HOT 1
- Sending unparsed data to fileReceiver HOT 5
- The "offer" block stays empty on all modern browsers HOT 7
- Maximum call stack size exceeded HOT 4
- Connection establishment fails
- Blogposts not reachable
- This demo is completely broken HOT 1
- Chrome error getting Offer HOT 4
- Unable to find native module HOT 2
- Broken in Chrome on Windows - jquery and getUserMedia detection, and non https - PR in comments HOT 1
- potential XSS in chat log HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serverless-webrtc.