by Pivec Labs
Live — Voice & Video Voice & Video

Live — Voice & Video

Group video calls of up to six players and one-to-many broadcasts, for players in the same SmartFoxServer room. Your zone extension handles the signalling; the media itself goes directly between players, or through your own TURN server.

01

What Live is#

NetCrafter Live adds real-time voice and video to a NetCrafter Pro game. It is built on Unity's com.unity.webrtc package and works with the SmartFoxServer 3 connection your game already has — no extra signalling service, no join codes: players who are in the same SFS3 room can call each other.

  • Calls — NetCrafterLiveCall: 1-to-1 or groups of up to 6 (every player connects to every other player). Push-to-talk, mute and camera on/off without renegotiating, private 1-to-1 invites, optional positional (3D) voice.
  • Broadcasts — NetCrafterLiveBroadcast: one player streams webcam, a RenderTexture (any camera) or a video, up to 8 players watch (configurable). Can run at the same time as a call.
  • Room link — NetCrafterLiveRoomLink: joins the room's call / starts or watches a broadcast automatically when your game joins its room.
02

How it works#

  Player A (Unity)                      SmartFoxServer 3                       Player B (Unity)
  NetCrafterLiveCall  ── "__ncl_*" ──▶  your zone extension  ── "__ncl_*" ──▶  NetCrafterLiveCall
                                        (NetCrafterLiveServer.java:
                                         call list, caps, signalling relay,
                                         time-limited TURN logins)

  Media (voice/video): directly A ⇄ B  ── or, when that's impossible ──▶  your TURN server (coturn)

SmartFoxServer never carries audio or video. It only tells players who is in which call and forwards the short WebRTC setup messages. Once two players have exchanged those, their devices send media straight to each other. When a direct path is impossible (strict NATs, company firewalls, many mobile networks) the media goes through a TURN relay — coturn, which you run yourself with the wizard in the Live window.

Nothing secret in your game

The TURN server uses time-limited logins: your zone extension creates a fresh login for each player from a shared secret that only exists on your server. A game build never contains a TURN password.

03

Demos#

  • Group Call — Examples/Live/Scenes/LiveCallDemo.unity: a 6-tile video grid with push-to-talk. Tutorial
  • Broadcast — LiveBroadcastDemo.unity: go live, or pick a broadcast to watch. Tutorial
  • TurnBased + Video Chat — TurnBasedVideoChatDemo.unity: the finished TurnBased game with a video chat panel. Tutorial
  • Character + Broadcast Screen — CharacterBroadcastDemo.unity: walk around and go live on a big screen in the world. Tutorial

All four are finished and playable. The first two use the Chat Definition's server (ChatRoomZone), the others the TurnBased and Character Definitions'.

04

Pages#

05

Requirements and limits#

  • Unity 6, com.unity.webrtc 3.0.0 or later (one-click install in the Live window). Without it, Live is simply not compiled — the rest of NetCrafter Pro is unaffected.
  • Windows, macOS, Linux, Android, iOS. WebGL is not supported by com.unity.webrtc.
  • Up to 6 players per call. Every player sends one copy of their video to every other player, so upload grows with the call size (see Bandwidth). Bigger meetings need a media server, which is a different kind of product.
  • Your zone extension must include NetCrafter Live (generated automatically from this version on — Getting Started step 2).