You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 25, 2024. It is now read-only.
* Fix port, line number reference in p2p sample README
Also, fix some formatting and add some helpful text.
Signed-off-by: Geoff Gustafson <[email protected]>
* moving to getDisplayMedia
* apply comments
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
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.
4
4
5
5
## 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.)
7
7
2. Go to "scripts" folder.
8
8
3. Run `npm install` to install development dependencies.
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
6
8
You need to edit the sample page `peercall.html`:
7
9
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.
10
14
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
12
17
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