The codelab code is packaged using npm. What we need to do is start our Node.js web server and then connect to it with a browser. We will do all these things locally for this lesson to get you acquainted with the sample.
First things first – we need to start the server. Type the following into the command-line in the codelab’s folder to start the web server:
If everything goes well, you should see something like this on your terminal:
The server is now listening on the local host (so you can only try to connect to it from a browser on the same machine) on port 8080.
For a real service you will need to:
Now that the server is up and waiting, you can connect to it by directing your web browser to http://localhost:8080. This is what you should see:
A few things to notice here (besides me being blond):
To start a session, open another browser tab (or another browser on the same machine) and open in it the URL that was created in the first window. In my case, this was http://localhost:8080/#892013db-bde4-4294-b9df-52d6d0d19669
Here’s what you should see (assuming you are as blond as I am):
If you notice the mirror view, that’s because of the way we’d like things to work. For displaying the local view (on the left), we usually prefer to mirror the image we capture on camera as it looks more natural.
Switch between the tabs and play with the action buttons on the screen to get acquainted with the application.
I’d also suggest opening chrome://webrtc-internals on a separate tab (prior to starting a session) and taking a peak in the terminal running the web server.