Skip to content

Commit c2c1a7d

Browse files
committed
Update README.md
1 parent 811ded7 commit c2c1a7d

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

README.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,19 +101,18 @@ On Windows [VS 2019](https://visualstudio.microsoft.com/thank-you-downloading-vi
101101
### Connecting to a room, publish video & audio
102102

103103
```dart
104-
var options = ConnectOptions(
105-
autoSubscribe: false,
106-
optimizeVideo: true,
107-
defaultVideoPublishOptions: VideoPublishOptions(
108-
simulcast: true,
109-
),
104+
final roomOptions = RoomOptions(
105+
adaptiveStream: true,
106+
dynacast: true,
107+
// ... your room options
110108
)
111-
var room = await LiveKitClient.connect(url, token, options: options);
109+
110+
final room = await LiveKitClient.connect(url, token, roomOptions: roomOptions);
112111
try {
113112
// video will fail when running in ios simulator
114113
await room.localParticipant.setCameraEnabled(true);
115-
} catch (e) {
116-
print('could not publish video: $e');
114+
} catch (error) {
115+
print('Could not publish video, error: $error');
117116
}
118117
119118
await room.localParticipant.setMicrophoneEnabled(true);
@@ -286,9 +285,6 @@ class _VideoViewState extends State<VideoView> {
286285
setState(() {
287286
if (subscribedVideos.length > 0) {
288287
var videoPub = subscribedVideos.first;
289-
if (videoPub is RemoteTrackPublication) {
290-
videoPub.videoQuality = widget.quality;
291-
}
292288
// when muted, show placeholder
293289
if (!videoPub.muted) {
294290
this.videoPub = videoPub;

0 commit comments

Comments
 (0)