Skip to content

Commit 3907bf1

Browse files
committed
docs: update example descriptions and add WebClientExample
1 parent 3b227f5 commit 3907bf1

File tree

1 file changed

+37
-9
lines changed

1 file changed

+37
-9
lines changed

docs/examples.md

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
This section provides an overview of the example applications included in the `webrtc-examples` Maven module. These examples demonstrate various features and capabilities of the webrtc-java library.
44

5-
## PeerConnectionExample
5+
## PeerConnection
66

7-
The `PeerConnectionExample` demonstrates how to set up a peer connection with audio and video tracks to be able to send and receive media.
7+
The [`PeerConnectionExample`](https://github.com/devopvoid/webrtc-java/blob/master/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/PeerConnectionExample.java) demonstrates how to set up a peer connection with audio and video tracks to be able to send and receive media.
88

99
**Key features demonstrated:**
1010
- Creating a PeerConnectionFactory
@@ -15,9 +15,9 @@ The `PeerConnectionExample` demonstrates how to set up a peer connection with au
1515

1616
This example provides a foundation for building WebRTC applications that need to handle audio and video communication.
1717

18-
## WhepExample
18+
## WHEP
1919

20-
The `WhepExample` demonstrates an implementation of WebRTC HTTP Egress Protocol (WHEP) client, which is a standardized protocol for WebRTC ingestion.
20+
The [`WhepExample`](https://github.com/devopvoid/webrtc-java/blob/master/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/WhepExample.java) demonstrates an implementation of WebRTC HTTP Egress Protocol (WHEP) client, which is a standardized protocol for WebRTC ingestion.
2121

2222
**Key features demonstrated:**
2323
- Setting up a WebRTC peer connection
@@ -27,9 +27,9 @@ The `WhepExample` demonstrates an implementation of WebRTC HTTP Egress Protocol
2727

2828
This example is useful for applications that need to receive media streams from WHEP-compatible servers, such as live streaming platforms.
2929

30-
## CodecListExample
30+
## Codec List
3131

32-
The `CodecListExample` demonstrates how to list all supported codecs with the WebRTC peer-connection-factory.
32+
The [`CodecListExample`](https://github.com/devopvoid/webrtc-java/blob/master/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/CodecListExample.java) demonstrates how to list all supported codecs with the WebRTC peer-connection-factory.
3333

3434
**Key features demonstrated:**
3535
- Creating a PeerConnectionFactory
@@ -38,9 +38,9 @@ The `CodecListExample` demonstrates how to list all supported codecs with the We
3838

3939
This example is useful for understanding what codecs are available on the current system, which can help with debugging compatibility issues or optimizing media quality.
4040

41-
## DesktopVideoExample
41+
## Desktop Video
4242

43-
The `DesktopVideoExample` demonstrates how to set up a peer connection with a desktop video source for screen or window capture.
43+
The [`DesktopVideoExample`](https://github.com/devopvoid/webrtc-java/blob/master/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/DesktopVideoExample.java) demonstrates how to set up a peer connection with a desktop video source for screen or window capture.
4444

4545
**Key features demonstrated:**
4646
- Creating a PeerConnectionFactory
@@ -52,6 +52,28 @@ The `DesktopVideoExample` demonstrates how to set up a peer connection with a de
5252

5353
This example is particularly useful for applications that need to implement screen sharing or remote desktop functionality.
5454

55+
## Web Client
56+
57+
The [`WebClientExample`](https://github.com/devopvoid/webrtc-java/blob/master/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/web/WebClientExample.java) demonstrates how to combine WebSocket signaling with WebRTC peer connections for real-time communication between web and Java clients.
58+
59+
**Key features demonstrated:**
60+
- Connecting to a signaling server using WebSockets
61+
- Setting up audio and video media tracks
62+
- Creating and managing WebRTC peer connections
63+
- Handling signaling messages (offers, answers, ICE candidates)
64+
- Joining and leaving rooms for multi-user communication
65+
- Using custom audio sources for audio streaming
66+
67+
This example is valuable for applications that need to establish WebRTC connections between Java clients and web browsers, enabling cross-platform real-time communication with audio and video.
68+
69+
**Note:** Before running the WebClientExample, you need to start the WebServer first. The WebServer provides the signaling service required for WebRTC connection establishment:
70+
71+
```bash
72+
mvn exec:java -D"exec.mainClass=dev.onvoid.webrtc.examples.web.server.WebServer"
73+
```
74+
75+
And the browser client is reachable at this url: https://localhost:8443
76+
5577

5678
## Running the Examples
5779

@@ -64,4 +86,10 @@ For example, to run the `CodecListExample`:
6486
mvn exec:java -D"exec.mainClass=dev.onvoid.webrtc.examples.CodecListExample"
6587
```
6688

67-
Note that these examples focus on setting up the local components for WebRTC communication. In a real application, you would need to establish a connection with a remote peer through a signaling channel (e.g., WebSocket).
89+
Or to run the `WebClientExample`:
90+
91+
```bash
92+
mvn exec:java -D"exec.mainClass=dev.onvoid.webrtc.examples.web.WebClientExample"
93+
```
94+
95+
Note that these examples focus on setting up the local components for WebRTC communication. In a real application, you would need to establish a connection with a remote peer through a signaling channel (e.g., WebSocket). The `WebClientExample` demonstrates this by connecting to a signaling server.

0 commit comments

Comments
 (0)