Search code examples
wordpresswidgetchatlive

How can I make a direct person-to-person chat widget for my website that doesn't use server resources?


I would like to add live text chat to my website, but without using too many server resources or a third party application. I'm not concerned about keeping a chat log/history at this point. How would I go about making a website chat widget (preferably WordPress friendly) that would only use server resources to establish the initial connection between 2 logged in users, but that would essentially let them chat live without relaying the message through my server? Is this technically feasible? Does a product like this exist already? I've searched could not find any one-time-fee live chat solutions that don't route through my server or through a third-party server.


Solution

  • This has been addressed here, but that is from 2011/2012.

    A quick googling seems to suggest WebRTC might be a good choice for this sort of thing.

    A few more minutes of research yields this, a javascript library for working with WebRTC.

    Even better: here is an example of a php chat server using WebRTC. This is probably what you'll want, seeing as WordPress is PHP.

    Hopefully this is enough info to get you started. Good luck!