-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to have a simpler example here? #35
Comments
There have been a few requests for "simpler" examples; however, I'm not sure what people actually want. An RTCDataChannel example? See the ping-pong example. An audio/video example? See the audio-video-loopback example. These examples — and all the other examples — have been structured so that you can focus on experimenting with node-webrtc's APIs without having to worry about exchanging WebRTC offers and answers. Because exchanging WebRTC offers and answers is one of the most boilerplate-y, annoying bits of WebRTC — and everyone does it differently! E.g., by
Since this project is not interested in prescribing a way to exchange WebRTC offers and answers, all that code is isolated to the lib/ folder. Instead, we focus on ways to use node-webrtc (since this is, after all, node-webrtc-examples). To this end, the examples have been written so that you don't have to worry about WebRTC offer and answer exchange. You just need to fulfill two functions: one for the client ( This model makes it really easy to add more and more examples. We have 8 or 9 ATM, depending on how you count. Perhaps what I have not made easy is
Anyway, perhaps I am speculating… but I'm also writing this for anyone else reading who is curious about this. I should return to your question: what would you like to see? |
It's been a while since this discussion took place, but i think what people mean by "simpler" is - that it wouldn't be a full project. I'm looking for it too. The examples are very good for learning and showcasing different capabilities and different use cases, but once i've learned, they are no longer beneficial since they rely on so much abstraction. The missing piece is an example with a single server file and a single client js file, no requiring other local files on either and no browserify and so on - standalone. will there be duplication? yes, and that's a good thing because standalone examples are very powerful. |
Any updates on the matter? |
Bump. Single files are the way to get started. They are not meant to be efficient, but rather circumscribe all the concepts we have to assimilate in one file. The layers of abstraction just hinder this. Ex: Simple-peer has examples where you have to exchange the offers by copying/pasting JSON. They were dead simple and very clear. |
All examlpes here confuse me a lot. Too many encapsulations or requires in those examples, so if there is a no-extra-dependency example or just an example that import modules from node_modules directory, will be helpful to me!
Thanks!
The text was updated successfully, but these errors were encountered: