简体   繁体   中英

Easiest method of adding video chat for 2 clients on my game website?

I currently am making an online chess site where you can play online chess!

While I have the board setup to be multiplayer using socket.io and nodejs, I do not know how to go about adding a video chat function to the site.

Right now, the way I have it set up is that upon loading the site, the user can enter a code to join a chess room.

How can I add a video chat that connects both clients to these rooms?

If you have any code for this project, please do share it. It's hard to provide an answer for nothing at all.

If you have no code, consider checking out some of these resources I've found-

  1. https://www.digitalocean.com/community/tutorials/front-and-rear-camera-access-with-javascripts-getusermedia

(This next one comes with a demo!)

  1. https://davidwalsh.name/browser-camera

  2. https://developers.google.com/web/fundamentals/media/capturing-images

Things To Note About Camera Use In The Web:

Direct access to the camera is a powerful feature. It requires consent from the user, and your site MUST be on a secure origin (HTTPS).

Hope this helped!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM