From c2c1a7dd79b0e9d0b02d4ba27394772065b06858 Mon Sep 17 00:00:00 2001 From: Hiroshi Horie <548776+hiroshihorie@users.noreply.github.com> Date: Thu, 3 Mar 2022 10:27:43 +0900 Subject: [PATCH] Update README.md --- README.md | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index cd113d9..03c0c9c 100644 --- a/README.md +++ b/README.md @@ -101,19 +101,18 @@ On Windows [VS 2019](https://visualstudio.microsoft.com/thank-you-downloading-vi ### Connecting to a room, publish video & audio ```dart -var options = ConnectOptions( - autoSubscribe: false, - optimizeVideo: true, - defaultVideoPublishOptions: VideoPublishOptions( - simulcast: true, - ), +final roomOptions = RoomOptions( + adaptiveStream: true, + dynacast: true, + // ... your room options ) -var room = await LiveKitClient.connect(url, token, options: options); + +final room = await LiveKitClient.connect(url, token, roomOptions: roomOptions); try { // video will fail when running in ios simulator await room.localParticipant.setCameraEnabled(true); -} catch (e) { - print('could not publish video: $e'); +} catch (error) { + print('Could not publish video, error: $error'); } await room.localParticipant.setMicrophoneEnabled(true); @@ -286,9 +285,6 @@ class _VideoViewState extends State { setState(() { if (subscribedVideos.length > 0) { var videoPub = subscribedVideos.first; - if (videoPub is RemoteTrackPublication) { - videoPub.videoQuality = widget.quality; - } // when muted, show placeholder if (!videoPub.muted) { this.videoPub = videoPub;