Skip to content

Commit 2f915c7

Browse files
committed
update documentation
1 parent 169ff8e commit 2f915c7

6 files changed

Lines changed: 172 additions & 123 deletions

File tree

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Easily send and share WebRTC media through [Janus](https://github.com/meetecho/j
1313
- EchoTest Plugin
1414
- VideoCall Plugin
1515
- VideoRoom Plugin
16+
- TextRoom Plugin
1617
- Extendable Transport class and Plugin class
1718

1819
## Library Installation

docs/plugins.md

Lines changed: 8 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,21 @@ Janus plugins provide specific functionality for different use cases. This libra
44

55
Plugins are the core components that implement specific WebRTC functionality. Each plugin corresponds to a server-side Janus plugin and provides a Python interface for interacting with it.
66

7-
## Base Plugin Class
7+
For detailed API documentation, see the [API Reference](reference.md#plugin-classes).
88

9-
All plugins inherit from the base `JanusPlugin` class, which provides common functionality for plugin lifecycle management, message handling, and WebRTC signaling.
9+
## Overview
1010

11-
::: janus_client.plugin_base.JanusPlugin
12-
options:
13-
show_root_heading: true
14-
show_source: false
15-
members_order: source
16-
docstring_section_style: table
17-
separate_signature: true
18-
show_signature_annotations: true
11+
All plugins inherit from the base `JanusPlugin` class, which provides common functionality for plugin lifecycle management, message handling, and WebRTC signaling. The library includes support for:
12+
13+
- **EchoTest Plugin** - Testing WebRTC connectivity
14+
- **VideoCall Plugin** - One-to-one video calls
15+
- **VideoRoom Plugin** - Multi-party video conferencing
16+
- **TextRoom Plugin** - Text-based communication via DataChannels
1917

2018
## EchoTest Plugin
2119

2220
The EchoTest plugin is useful for testing WebRTC connectivity. It echoes back any media sent to it, making it perfect for testing your setup.
2321

24-
::: janus_client.plugin_echotest.JanusEchoTestPlugin
25-
options:
26-
show_root_heading: true
27-
show_source: false
28-
members_order: source
29-
docstring_section_style: table
30-
separate_signature: true
31-
show_signature_annotations: true
32-
3322
### EchoTest Usage Example
3423

3524
```python
@@ -61,15 +50,6 @@ if __name__ == "__main__":
6150

6251
The VideoCall plugin enables one-to-one video calls between users. It handles user registration, call initiation, and call management.
6352

64-
::: janus_client.plugin_video_call.JanusVideoCallPlugin
65-
options:
66-
show_root_heading: true
67-
show_source: false
68-
members_order: source
69-
docstring_section_style: table
70-
separate_signature: true
71-
show_signature_annotations: true
72-
7353
### VideoCall Usage Example
7454

7555
```python
@@ -107,31 +87,6 @@ if __name__ == "__main__":
10787

10888
The VideoRoom plugin enables multi-party video conferencing. It supports room management, publishing, and subscribing to multiple video feeds.
10989

110-
::: janus_client.plugin_video_room.JanusVideoRoomPlugin
111-
options:
112-
show_root_heading: true
113-
show_source: false
114-
members_order: source
115-
docstring_section_style: table
116-
separate_signature: true
117-
show_signature_annotations: true
118-
119-
### VideoRoom State Class
120-
121-
::: janus_client.plugin_video_room.JanusVideoRoomPlugin.State
122-
options:
123-
show_root_heading: true
124-
show_source: false
125-
docstring_section_style: table
126-
127-
### AllowedAction Enum
128-
129-
::: janus_client.plugin_video_room.AllowedAction
130-
options:
131-
show_root_heading: true
132-
show_source: false
133-
docstring_section_style: table
134-
13590
### VideoRoom Usage Example
13691

13792
```python
@@ -172,31 +127,6 @@ if __name__ == "__main__":
172127

173128
The TextRoom plugin enables text-based communication through WebRTC DataChannels. It supports multiple rooms, public and private messaging, room management, and message history.
174129

175-
::: janus_client.plugin_textroom.JanusTextRoomPlugin
176-
options:
177-
show_root_heading: true
178-
show_source: false
179-
members_order: source
180-
docstring_section_style: table
181-
separate_signature: true
182-
show_signature_annotations: true
183-
184-
### TextRoomError Exception
185-
186-
::: janus_client.plugin_textroom.TextRoomError
187-
options:
188-
show_root_heading: true
189-
show_source: false
190-
docstring_section_style: table
191-
192-
### TextRoomEventType Enum
193-
194-
::: janus_client.plugin_textroom.TextRoomEventType
195-
options:
196-
show_root_heading: true
197-
show_source: false
198-
docstring_section_style: table
199-
200130
### TextRoom Usage Examples
201131

202132
#### Basic Room Communication

docs/reference.md

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# API Reference
2+
3+
Complete API reference for all classes, methods, and types in the Python Janus Client library.
4+
5+
## Session Classes
6+
7+
### JanusSession
8+
9+
::: janus_client.session.JanusSession
10+
options:
11+
show_root_heading: true
12+
show_source: false
13+
members_order: source
14+
docstring_section_style: table
15+
separate_signature: true
16+
show_signature_annotations: true
17+
18+
### PluginAttachFail Exception
19+
20+
::: janus_client.session.PluginAttachFail
21+
options:
22+
show_root_heading: true
23+
show_source: false
24+
docstring_section_style: table
25+
26+
## Plugin Classes
27+
28+
### Base Plugin Class
29+
30+
::: janus_client.plugin_base.JanusPlugin
31+
options:
32+
show_root_heading: true
33+
show_source: false
34+
members_order: source
35+
docstring_section_style: table
36+
separate_signature: true
37+
show_signature_annotations: true
38+
39+
### EchoTest Plugin
40+
41+
::: janus_client.plugin_echotest.JanusEchoTestPlugin
42+
options:
43+
show_root_heading: true
44+
show_source: false
45+
members_order: source
46+
docstring_section_style: table
47+
separate_signature: true
48+
show_signature_annotations: true
49+
50+
### VideoCall Plugin
51+
52+
::: janus_client.plugin_video_call.JanusVideoCallPlugin
53+
options:
54+
show_root_heading: true
55+
show_source: false
56+
members_order: source
57+
docstring_section_style: table
58+
separate_signature: true
59+
show_signature_annotations: true
60+
61+
### VideoRoom Plugin
62+
63+
::: janus_client.plugin_video_room.JanusVideoRoomPlugin
64+
options:
65+
show_root_heading: true
66+
show_source: false
67+
members_order: source
68+
docstring_section_style: table
69+
separate_signature: true
70+
show_signature_annotations: true
71+
72+
#### VideoRoom State Class
73+
74+
::: janus_client.plugin_video_room.JanusVideoRoomPlugin.State
75+
options:
76+
show_root_heading: true
77+
show_source: false
78+
docstring_section_style: table
79+
80+
#### AllowedAction Enum
81+
82+
::: janus_client.plugin_video_room.AllowedAction
83+
options:
84+
show_root_heading: true
85+
show_source: false
86+
docstring_section_style: table
87+
88+
### TextRoom Plugin
89+
90+
::: janus_client.plugin_textroom.JanusTextRoomPlugin
91+
options:
92+
show_root_heading: true
93+
show_source: false
94+
members_order: source
95+
docstring_section_style: table
96+
separate_signature: true
97+
show_signature_annotations: true
98+
99+
#### TextRoomError Exception
100+
101+
::: janus_client.plugin_textroom.TextRoomError
102+
options:
103+
show_root_heading: true
104+
show_source: false
105+
docstring_section_style: table
106+
107+
#### TextRoomEventType Enum
108+
109+
::: janus_client.plugin_textroom.TextRoomEventType
110+
options:
111+
show_root_heading: true
112+
show_source: false
113+
docstring_section_style: table
114+
115+
## Transport Classes
116+
117+
### Base Transport Class
118+
119+
::: janus_client.transport.JanusTransport
120+
options:
121+
show_root_heading: true
122+
show_source: false
123+
members_order: source
124+
docstring_section_style: table
125+
separate_signature: true
126+
show_signature_annotations: true
127+
128+
### HTTP Transport
129+
130+
::: janus_client.transport_http.JanusTransportHTTP
131+
options:
132+
show_root_heading: true
133+
show_source: false
134+
members_order: source
135+
docstring_section_style: table
136+
separate_signature: true
137+
show_signature_annotations: true
138+
139+
### WebSocket Transport
140+
141+
::: janus_client.transport_websocket.JanusTransportWebsocket
142+
options:
143+
show_root_heading: true
144+
show_source: false
145+
members_order: source
146+
docstring_section_style: table
147+
separate_signature: true
148+
show_signature_annotations: true

docs/session.md

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,16 @@ Create a session object that can be shared between plugin handles.
44

55
The session is the main entry point for communicating with a Janus WebRTC Gateway server. It manages the connection, handles message routing, and provides lifecycle management for plugins.
66

7-
## JanusSession
8-
9-
::: janus_client.session.JanusSession
10-
options:
11-
show_root_heading: true
12-
show_source: false
13-
members_order: source
14-
docstring_section_style: table
15-
separate_signature: true
16-
show_signature_annotations: true
17-
18-
## PluginAttachFail Exception
19-
20-
::: janus_client.session.PluginAttachFail
21-
options:
22-
show_root_heading: true
23-
show_source: false
24-
docstring_section_style: table
7+
For detailed API documentation, see the [API Reference](reference.md#session-classes).
8+
9+
## Overview
10+
11+
A `JanusSession` represents a connection to a Janus WebRTC Gateway server. It:
12+
13+
- Manages the underlying transport (HTTP or WebSocket)
14+
- Routes messages between plugins and the server
15+
- Handles session lifecycle (creation, keepalive, destruction)
16+
- Provides automatic cleanup through async context managers
2517

2618
## Usage Examples
2719

docs/transport.md

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,16 @@
22

33
Transport classes handle the actual communication with the Janus server. The transport method is automatically detected using regex patterns on the base_url parameter passed to the Session object.
44

5-
## Base Transport Class
5+
For detailed API documentation, see the [API Reference](reference.md#transport-classes).
66

7-
::: janus_client.transport.JanusTransport
8-
options:
9-
show_root_heading: true
10-
show_source: false
11-
members_order: source
12-
docstring_section_style: table
13-
separate_signature: true
14-
show_signature_annotations: true
7+
## Overview
8+
9+
The transport layer provides the communication mechanism between your application and the Janus WebRTC Gateway server. The library automatically selects the appropriate transport based on the URL scheme you provide.
1510

1611
## HTTP Transport
1712

1813
The HTTP transport implementation provides communication with Janus server over HTTP/HTTPS using long polling for receiving messages.
1914

20-
::: janus_client.transport_http.JanusTransportHTTP
21-
options:
22-
show_root_heading: true
23-
show_source: false
24-
members_order: source
25-
docstring_section_style: table
26-
separate_signature: true
27-
show_signature_annotations: true
28-
2915
### HTTP Transport Features
3016

3117
- **Protocol Support**: HTTP and HTTPS
@@ -61,15 +47,6 @@ if __name__ == "__main__":
6147

6248
The WebSocket transport implementation provides real-time, full-duplex communication with the Janus server.
6349

64-
::: janus_client.transport_websocket.JanusTransportWebsocket
65-
options:
66-
show_root_heading: true
67-
show_source: false
68-
members_order: source
69-
docstring_section_style: table
70-
separate_signature: true
71-
show_signature_annotations: true
72-
7350
### WebSocket Transport Features
7451

7552
- **Full-Duplex Communication**: Real-time bidirectional messaging

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ nav:
9393
- Session: session.md
9494
- Plugins: plugins.md
9595
- Transport: transport.md
96+
- API Reference: reference.md
9697

9798
extra:
9899
social:

0 commit comments

Comments
 (0)