protocol 8. (#134)

* protocol 8.

* add FastConnectOptions.

* update.

* fix.

* Deprecated the top connect method.

* Add fast connect button in example.

* Create a Listener before connecting.

* Force protocol-v7 for deprecated APIs.

* remove commented out line.

* relative path import.

* update.
This commit is contained in:
CloudWebRTC
2022-07-11 19:54:08 +08:00
committed by GitHub
parent 66d4052ada
commit 3d8bf96651
8 changed files with 122 additions and 18 deletions
+3
View File
@@ -64,6 +64,7 @@ class Engine extends Disposable with EventsEmittable<EngineEvent> {
ConnectOptions connectOptions;
RoomOptions roomOptions;
FastConnectOptions? fastConnectOptions;
bool _subscriberPrimary = false;
@@ -100,12 +101,14 @@ class Engine extends Disposable with EventsEmittable<EngineEvent> {
String token, {
ConnectOptions? connectOptions,
RoomOptions? roomOptions,
FastConnectOptions? fastConnectOptions,
}) async {
this.url = url;
this.token = token;
// update new options (if exists)
this.connectOptions = connectOptions ?? this.connectOptions;
this.roomOptions = roomOptions ?? this.roomOptions;
this.fastConnectOptions = fastConnectOptions;
_updateConnectionState(ConnectionState.connecting);