Skip to content

Commit 9f153d3

Browse files
committed
Update readme with screen sharing docs
1 parent 66dbc94 commit 9f153d3

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ More Docs and guides are available at [https://docs.livekit.io](https://docs.liv
1414
| :-----: | :---------------: | :-------: | :--------------: | :------------: |
1515
| Web | 🟢 | 🟢 | 🟢 | 🟢 |
1616
| iOS | 🟢 | 🟢 | 🟢 | 🔴 |
17-
| Android | 🟢 | 🟢 | 🟢 | 🔴 |
17+
| Android | 🟢 | 🟢 | 🟢 | 🟢 |
1818

1919
🟢 = Available
2020
🟡 = Coming soon (Work in progress)
@@ -82,7 +82,14 @@ We built a multi-user conferencing app as an example in the [example/](example/)
8282
### Connecting to a room, publish video & audio
8383

8484
```dart
85-
var room = await LiveKitClient.connect(url, token);
85+
var options = ConnectOptions(
86+
autoSubscribe: false,
87+
optimizeVideo: true,
88+
defaultVideoPublishOptions: VideoPublishOptions(
89+
simulcast: true,
90+
),
91+
)
92+
var room = await LiveKitClient.connect(url, token, options: options);
8693
try {
8794
// video will fail when running in ios simulator
8895
await room.localParticipant.setCameraEnabled(true);
@@ -93,6 +100,27 @@ try {
93100
await room.localParticipant.setMicrophoneEnabled(true);
94101
```
95102

103+
### Screen sharing
104+
105+
```dart
106+
room.localParticipant.setScreenShareEnabled(true);
107+
```
108+
109+
On Android, you would have to define a foreground service in your AndroidManifest.xml.
110+
111+
```xml title="AndroidManifest.xml"
112+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
113+
<application>
114+
...
115+
<service
116+
android:name="de.julianassmann.flutter_background.IsolateHolderService"
117+
android:enabled="true"
118+
android:exported="false"
119+
android:foregroundServiceType="mediaProjection" />
120+
</application>
121+
</manifest>
122+
```
123+
96124
### Advanced track manipulation
97125

98126
The setCameraEnabled/setMicrophoneEnabled helpers are wrappers around the Track API.

0 commit comments

Comments
 (0)