Go Back
Lesson 3 || web10 messaging app
messaging + P2P webrtc streaming
- make a new repl html, css, js project
- copy all of the lesson 3 files into the
repl
- add your institutions provider, app store registry server, and webRTC server.
- do this by setting the variables web10_authenticator web10_registrar, and web10_webRTC
- however, you will need to let others create mail to your inbox
- to do so, in script.js, uncomment out the whitelist create entry
- also, add the url of your github pages site and replit url to the list of cross_origins.
- as a user, if you log in and approve, you should be able to write messages!
- try sending a message to a classmate. your will need to reload the page to see incoming messages.
- finish the deleteMail function, follow the directions in the comments.
- check that it works!
- we will use webRTC to make it so you won't need to reload the page to see new messages.
- uncomment out the wapi.initP2P line that initializes the P2P functionality.
- it lets people ping you, to tell you to re read your mail
- uncomment out the .then function with wapi.send
- now try sending messages, they should instantly load for your friends.
- on repl, hit the github branch icon , commit, and push
your
changes
to a new repo named web10-lesson3.
- Congratulations! you made your first P2P streaming web10 app!