From ce1b23a75d490b7c30ccaaa6d841d989fb661bfd Mon Sep 17 00:00:00 2001 From: "duanweiwei1982@gmail.com" Date: Mon, 23 Sep 2024 22:06:56 +0800 Subject: [PATCH] update. --- lib/src/livekit.dart | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/src/livekit.dart b/lib/src/livekit.dart index 01b04d68..6e9ba56f 100644 --- a/lib/src/livekit.dart +++ b/lib/src/livekit.dart @@ -12,8 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +import 'package:flutter_webrtc/flutter_webrtc.dart' as rtc; + /// Main entry point to connect to a room. /// {@category Room} class LiveKitClient { static const version = '2.2.6'; + + /// Initialize the WebRTC plugin. If this is not manually called, will be + /// initialized with default settings. + /// This method must be called before calling any LiveKit SDK API. + static Future initialize({bool bypassVoiceProcessing = false}) async { + await rtc.WebRTC.initialize(options: { + if (bypassVoiceProcessing) 'bypassVoiceProcessing': bypassVoiceProcessing, + }); + } }