Package Description
Looking to push your players' realistic experience one step forward?
Give them the opportunity to video call each other!
You can check out a promotional video here.
The resource is using Asset Escrow system.
Your server needs to be in an artifacts version that supports it.
The resource comes with an extensive configuration, events, exports and some client / server source files to allow you to customize it to your liking.
It is a standalone resource and works with any framework and can be hooked to any Lua NUI-based phone given you can develop the hook for it.
Out of the box we provide you hooks for gcphone, qb-phone, high-phone and qs-smartphone which cover those phones and also mainstream versions that are based on them like gksphone and xenknight. The hooks can be adjusted to your liking for element or style changes. There may be more available hooks shared in our Discord by our community. You may also find some more public hooks here.
If you are a phone developer and a hook covers your phone but you don't want it to, or if you want us to make a hook that does cover your phone, please contact us.
A TURN server is included that is mandatory, with yarn resource required as a dependency. The TURN server acts as a middleman to hide players' IP address from each other, therefore it imposes network and bandwidth requirements (requires approximately 2mbps download and 2mbps upload for each active transmission with a two-way active video call having two active transmissions) and requires an extra UDP port to be open. Besides the integrated solution, the TURN server is also offered as an external node.js application to be hosted in the same or in a different machine allowing you to offset the network and bandwidth requirements (however the external also requires a TCP port to be open).
Features
- Real-time video call experience using WebRTC technology.
- Zero interaction with your phone's VoIP meaning it will work in parallel with any VoIP (TokoVoip, Mumble, WebRTC etc.).
- Ability to switch between the back and the front camera.
- Dynamic adjustment to center properly in various resolutions.
- Plug-and-play integration with phones that we offer out-of-the-box hooks for.
- Color filters (grayscale, sepia, invert, saturate, etc.).
- Image filters with real-time player ped face-tracking (dog, cat, etc.).
- Optimized for a balance between quality and performance.
- Routing via a TURN server to protect your players' privacy never revealing their IP address.
- Automatic video reconnect in case of WebRTC disconnects with a minimal video downtime.
- An experimental camera mode that allows the player to move while video calling.
- A wide array of events and exports to check and control the resource, as well limit the video call ability to specific players (e.g. for your VIP system).
Installation Instructions
- Make sure you have yarn in your resources folder.
- Download cs-video-call and place it in your resources folder.
- Add ensure cs-video-call to your server's configuration file before ensuring your phone.
- Edit your phone's __resource.lua or fxmanifest.lua file and add '@cs-video-call/client/hooks/core.lua' as the last client script and '@cs-video-call/server/hooks/core.lua' as the last server script.
- Edit your phone's NUI file (usually index.html) and add <script type="text/javascript" src="nui://cs-video-call/client/hooks/core.js"></script> right before </body>.
- Check the config.lua file inside cs-video-call for further configuration and read through all options and their comments as some are very important for the setup process and adjust them to your setup and preferences.
- Given you're using the internal solution, open the required port (by default 34540; incoming - inbound) in your firewall on UDP protocol.
- Run the command refresh and the command ensure cs-video-call and wait until yarn finishes the installation.
- If your phone uses an animation loop you may need to edit it (usually found in an animation.lua file) and add a not CS_VIDEO_CALL.ACTIVE check before playing an animation to ensure an animation glitch does not occur when the video call camera is opened.
- Ensure your phone.
External Proxy Server
If you choose not to use the integrated proxy server then download the external node.js application and install it with npm install, read through all options and their comments inside its config.js file as they are very important for the setup process, adjust them to your setup and preferences and then run it with node, then make sure to add the external server's IP address in the sv_proxyIPRanges property in your server's configuration file. You can use pm2 to make sure it runs all the time.
Important Information
- The video call will not work without the proxy server, direct P2P is not given as an option in order to protect players' anonymity.
- Besides your proxy server's network speeds which must match the amount of maximum active transmissions you want to have (you can limit those in the configuration), you will also need to consider bandwidth consumption if that is not unlimited by your host.
- Video render lag / freezes may be caused in very high resolutions or in very low-spec systems.
- When video call is active, the player who transmits the video cannot move. This is default GTA:V camera behavior. You can try using experimental camera mode which allows the player to move, however it might not be as smooth as the native one.
- The video call works using game capture (similar to screenshot-basic), the player sees whatever it's on the game of the other player. That includes visual settings / mods, game drawings / UIs but not NUIs.
- If your server is running behind a reverse proxy that you have no control over and cannot handle an extra UDP port as required by the resource, your only option may be to externally host the video call's proxy server in a different machine (for example a cheap VPS with enough bandwidth / network to work within your own limits) that can handle the requirements.
- When a player initiates a video call, it will consume approximately 2mbps of their upload speed for the transmission and when they are in a call and the other player initiates a video call it will consume approximately 2mbps of their download speed.
- Your players may be prompted by their Windows Firewall to allow a connection the first time a video call happens, this is due to the WebRTC protocol connection and cannot be circumvented.
- There are checks in place to ensure that the transmitted video feed is legitimate and is coming from the game itself, however since the client sends it, it cannot be fully trusted.
Frequent Issues & Questions
Q: I can perform a video call but when the other player opens their camera all I see is a black screen, why?
A: Black screen issue is usually related to UDP blocking, complex network setup or anti-DDoS protection. Try a different port, preferably in a high range to see if that will resolve your issue and make sure that port is open for UDP protocol. If that doesn't work then your best solution here may be to externally host the video call's proxy server in a different machine (for example a cheap VPS with enough bandwidth / network to work within your own limits) that can handle the requirements.
Q: I've done everything but I cannot see a video call button, what's wrong?
A: Not seeing a video call button is possibly related to the hook you are using. First make sure you are using the correct hook for the phone you have. Then make sure your phone events and DOM elements are properly reflected in the hook and that the hook is configured properly.
Q: My yarn is repeatedly trying to install the resource, what do I do?
A: This seems to be a current bug in the yarn resource related to package.json and the server's time zone related to the time zone of the system you copied the resource from. Edit package.json and just add or remove a space character, save it and the issue will go away.