FM WebSocket 4.0

Description
Minimal setup guide for Internet Live Stream via FMWebsocketManager.


Basic Setup

FM WebSocket 4.0 supports “Room System” with customised room name.
All the data are streaming through the self-host node.js server. (server script included in the package)

Thus, there are two parts in this tutorial setup.
Part A: node.js server
Part B: Unity3D FMWebSocketManager

Part A: Node.js server

Our example server is located in our plugin root folder
/FMWebSocket/TestServer_v4.x.x/Resources/FMWebSocket

1. Install npm + node.js
Download and install necessary items https://nodejs.org/en/download/

2. Install express
https://expressjs.com/en/starter/installing.html
cmd/terminal: npm init
cmd/terminal: Enter…
cmd/terminal: npm install express –save

3. Install ws module
cmd/terminal: npm install ws

4. Finish & Test on localhost

You may follow this step-by-step tutorial, the commands are compatible in Mac/Windows/Linux
https://youtu.be/Zjm5KGHyceU

Part B: Unity3D FM WebSocket Manager Setup

1. Create a new GameObject in your scene, and name it “FM WebSocket Manager”.
2. Add Component FMWebSocketManager.cs
3. Choose Network Type: Room
4. enabled Auto Init is recommended, which will automatically start the connection in runtime.
5. you may also connect them manually as alternative via script.