官术网_书友最值得收藏!

Chapter 4. Building a Chatroulette

The best way to master MediaStream and PeerJS is by building real-world applications, which is what we will do in this chapter. A chatroulette is a website that pairs random site visitors together for webcam and text-based conversation. Discussing how to build a chatroulette will help us to study PeerJS and PeerServer in depth, as it requires us to integrate PeerServer with Express. We will also add media controls to our site in order to pause/resume local MediaStream and allow the user to choose their desired microphone/webcam, which will help us to study MediaStream even more in depth. We will be actually creating a chatroulette that only allows the users of a particular country to chat, which would require an extra step of verification before connecting to the PeerServer; therefore, taking us even deeper into the integration of PeerServer into Express.

In this chapter, we will cover the following topics:

  • Running your own instance of PeerServer
  • Creating a custom PeerServer
  • Integrating PeerServer with Express
  • Verify users for connecting to PeerServer
  • Finding the IP address and country of a user connected to the server
  • Allowing the user to use a microphone and webcam directly on the webpage
  • Discussing the requirements for building a completely working chatroulette
主站蜘蛛池模板: 会昌县| 依兰县| 武冈市| 犍为县| 广宗县| 绿春县| 台东县| 桐柏县| 八宿县| 景泰县| 获嘉县| 郑州市| 米易县| 姜堰市| 黄浦区| 墨竹工卡县| 乳源| 大足县| 台中县| 黄陵县| 凭祥市| 金秀| 九龙城区| 楚雄市| 乐业县| 县级市| 西畴县| 商丘市| 卢湾区| 沭阳县| 安泽县| 黄平县| 那坡县| 闵行区| 沁水县| 北辰区| 舟曲县| 宁南县| 崇左市| 阿拉善右旗| 孟村|