Skip to content

Commit

Permalink
Fix port, line number reference in p2p sample README
Browse files Browse the repository at this point in the history
Also, fix some formatting and add some helpful text.

Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
  • Loading branch information
grgustaf committed May 24, 2019
1 parent 394d15a commit 4a30232
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Open WebRTC Toolkit JavaScript SDK builds on top of the W3C standard WebRTC APIs to accelerate development of real-time communications (RTC) for web applications, including peer-to-peer, broadcasting, and conference mode communications.

## How to build release package
1. Run `npm install -g grunt-cli` to install grunt.
1. Run `npm install -g grunt-cli` to install grunt. (You may need to `chown -R $USER /usr/local` for this to work.)
2. Go to "scripts" folder.
3. Run `npm install` to install development dependencies.
4. Run `grunt`.
Expand Down
24 changes: 14 additions & 10 deletions src/samples/p2p/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
#How to run p2p sample
###1st step: Run Woogeen p2p server
To run the server, you need to install node and npm, then change directory into server, and install all modules listed as dependencies in package.json by using command **`npm install`** .
After dependencies successfully installed, you can run the peerserver.js by using command **`node peerserver.js`**. It will listen on port 8085/8096.
###2nd step: Deploy p2p sample page and sdk on web server
# How to run p2p sample

## Step 1: Run p2p server
To run the server, you need to install node and npm, then change into the [owt-server-p2p](https://github.com/open-webrtc-toolkit/owt-server-p2p) source directory, and install all modules listed as dependencies in package.json by using command `npm install` .
After the dependencies are successfully installed, you can run the peer server by using the command `node peerserver.js`. It will listen on ports 8095/8096.

## Step 2: Deploy p2p sample page and sdk on web server
You need to edit the sample page `peercall.html`:

- Set serverAddress in line 128, change `example.com` to your p2p server address.
- Set correct ICE server address.
- Set serverAddress on line 112: change `example.com` to your p2p server address.
- Set correct ICE server addresses below that.

Then choose a webserver such as Apache, and deploy the page and the sdk.

Then choose a webserver such as apache, deploy the page and sdk.
## Step 3: Visit the website
You can then visit the page from a web browser, with a URL such as https://server.domain.com:<PORT>/peercall.html

###3rd step: Visit the website
You can visit the page on web browser
Open the web page from two clients with cameras connected, and choose two names. On one, type the first name and click **Login**, then type the second name and click **Set Remote Id**. On the other client, swap the names. Then click **Share Camera** on each to stream video.

0 comments on commit 4a30232

Please sign in to comment.