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
Copy file name to clipboardExpand all lines: README.md
+64-18Lines changed: 64 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,69 +34,115 @@ To ensure wide hardware acceleration support, compatibility with embedded device
34
34
35
35
## Quickstart
36
36
37
-
The easiest way to run PulseBeam is with Docker:
37
+
Getting started is a simple, step-by-step process. First, you'll run the server on your machine, and then you'll connect to it using the browser-based demos.
38
+
39
+
### Step 1: Run the PulseBeam Server
40
+
41
+
You must have the server running before the demo clients can connect. The easiest way to start it is with Docker.
42
+
43
+
Open your terminal and run the following command:
38
44
39
45
```bash
40
46
docker run --rm --net=host ghcr.io/pulsebeamdev/pulsebeam:pulsebeam-v0.1.12
41
-
````
47
+
```
48
+
49
+
This command starts the PulseBeam server, which is now listening for connections on your machine. Keep this terminal window running.
42
50
43
-
Other ways to run:
51
+
> **Other ways to run:**
52
+
>
53
+
> ***Binary:** download from [Releases](https://github.com/pulsebeamdev/pulsebeam/releases/latest)
54
+
> ***Source:**`cargo run --release -p pulsebeam`
44
55
45
-
***Binary:** download from [Releases](https://github.com/pulsebeamdev/pulsebeam/releases)
46
-
***Source:**`cargo run --release -p pulsebeam`
56
+
### Step 2: Run the Browser Demo
47
57
58
+
With the server running, you can use the demo clients. The snippets below show the core JavaScript logic.
48
59
49
-
### Demo: Broadcast
60
+
**Note:** The linked JSFiddles are configured to connect to `http://localhost:3000` and are intended to be run on the **same machine** as the server. See the section below for instructions on testing with other devices.
50
61
51
-
The following snippets demonstrate how to use the browser-native WebRTC API to interact with PulseBeam. The HTML and UI code has been removed for clarity.
62
+
#### A. Start the Publisher
52
63
53
-
Full, runnable examples are available inthe JSFiddle links.
64
+
The publisher page accesses your webcam and sends the video stream to your local PulseBeam server.
54
65
55
-
#### Publisher (sends video)
66
+
***[Open Publisher Demo in JSFiddle](https://jsfiddle.net/lherman/0bqe6xnv/)**
56
67
57
-
This snippet shows the core JavaScript logic for publishing a video stream.
68
+
Once the page loads, click **"Start Publishing"** to begin the stream.
58
69
59
70
```javascript
71
+
// Core publisher logic
60
72
constpc=newRTCPeerConnection();
61
73
74
+
// 1. Get user's video and add it to the connection
**See the full example:** [Open Viewer JSFiddle](https://jsfiddle.net/lherman/xotv9h6m)
125
+
### Optional: Testing From Another Device
126
+
127
+
To run the viewer on a different device on your local network (like your phone), you must replace `localhost` with your computer's local network IP address.
128
+
129
+
1.**Find your computer's Local IP Address.** On the machine running the Docker container, open a terminal and run:
130
+
***macOS / Linux**: `ifconfig` or `ip a`
131
+
***Windows**: `ipconfig`
132
+
Look for an address like `192.168.1.123`.
133
+
134
+
2.**Modify the JSFiddle Code.** Open the [Viewer JSFiddle](https://jsfiddle.net/lherman/xotv9h6m) on your second device. In the JavaScript panel, find the `fetch` call and replace `localhost` with your computer's IP address:
135
+
136
+
```javascript
137
+
// Change this line in the JSFiddle on your second device
0 commit comments