Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit 4096b5d

Browse files
authored
Merge pull request #147 from grgustaf/p2p-sample-readme-update
Fix port, line number reference in p2p sample README
2 parents 394d15a + 4a30232 commit 4096b5d

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
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.
44

55
## How to build release package
6-
1. Run `npm install -g grunt-cli` to install grunt.
6+
1. Run `npm install -g grunt-cli` to install grunt. (You may need to `chown -R $USER /usr/local` for this to work.)
77
2. Go to "scripts" folder.
88
3. Run `npm install` to install development dependencies.
99
4. Run `grunt`.

src/samples/p2p/README.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
#How to run p2p sample
2-
###1st step: Run Woogeen p2p server
3-
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`** .
4-
After dependencies successfully installed, you can run the peerserver.js by using command **`node peerserver.js`**. It will listen on port 8085/8096.
5-
###2nd step: Deploy p2p sample page and sdk on web server
1+
# How to run p2p sample
2+
3+
## Step 1: Run p2p server
4+
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` .
5+
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.
6+
7+
## Step 2: Deploy p2p sample page and sdk on web server
68
You need to edit the sample page `peercall.html`:
79

8-
- Set serverAddress in line 128, change `example.com` to your p2p server address.
9-
- Set correct ICE server address.
10+
- Set serverAddress on line 112: change `example.com` to your p2p server address.
11+
- Set correct ICE server addresses below that.
12+
13+
Then choose a webserver such as Apache, and deploy the page and the sdk.
1014

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

13-
###3rd step: Visit the website
14-
You can visit the page on web browser
18+
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 commit comments

Comments
 (0)