For this week, I made a very slow type of chat messaging (calling it snail msg for now?). The idea is that you can only send one letter at a time. I guess I am making this as a reminder to slow down and to be ok with taking my time. Sometimes I expect things to arrive immediately- a thesis idea, great project concepts, someone’s email/text response, skills, knowledge. It’s helpful, especially right now, to remind myself to not rush. This is a super simple chat messaging system (a lot of the code was tweaked from the class example), but I enjoy the fact that it forces me to pay attention to every letter I type.
Notes & Questions:
- In WebRTC, There have three main JavaScript APIs: 1. MediaStream, 2. RTCPeerConnection, 3. RTCDataChannel.
- Why do I keep getting this “Resource interpreted as Stylesheet but transferred with MIME type text/html:” and am not able to link my stylesheet. I have usually been able to do so in the past. What is different this time? Searched throughout stackoverflow, but couldn’t find a solution. In the meantime, I just added the style to the html pg.
- had issues with creating a new div for each data that was sent over socket. realized the issue was that I was creating a new textNode to append to the div, when it should have been a new innerHTML to append! this was the solution!
- add class to newly appended div: “newDiv.className = ‘name of class'”
- also getting errors when using my own fonts. says “https://stackoverflow.com/questions/34133808/webpack-ots-parsing-error-loading-fonts
- error loading fonts – answer?
References:
- https://blog.bitsrc.io/use-webrtc-and-peerjs-to-build-an-image-sharing-app-f8163b6a6266
- https://stackoverflow.com/questions/21585681/send-image-data-over-rtc-data-channel
- https://bloggeek.me/send-file-webrtc-data-api/
- https://www.html5rocks.com/en/tutorials/webrtc/datachannels/
- https://webrtc.github.io/samples/src/content/datachannel/filetransfer/
- https://www.webrtc-experiment.com/docs/how-file-broadcast-works.html
- appending div to another div
- append data to div on client side
- general helpful lines
Lines to Remember:
npm install nedb