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

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
主站蜘蛛池模板: 东至县| 乾安县| 刚察县| 西和县| 五峰| 黄平县| 金溪县| 淳安县| 苍溪县| 五台县| 龙游县| 阿勒泰市| 吉林省| 石嘴山市| 山东省| 伊金霍洛旗| 桑日县| 拉萨市| 思南县| 财经| 客服| 穆棱市| 阜阳市| 平远县| 台江县| 卢氏县| 甘肃省| 高阳县| 鄂托克旗| 闻喜县| 乌海市| 博湖县| 新丰县| 金坛市| 淅川县| 金堂县| 焦作市| 遂昌县| 定陶县| 仪陇县| 榆树市|