join method

Future<SpaceDTO?> join({
  1. required String spaceId,
  2. String? address,
  3. String? pgpPrivateKey,
  4. Signer? signer,
  5. String? livepeerApiKey,
})

Implementation

Future<SpaceDTO?> join({
  required String spaceId,
  String? address,
  String? pgpPrivateKey,
  Signer? signer,
  String? livepeerApiKey,
}) async {
  if (spaceId != data.spaceId) {
    await initializeData(spaceId: spaceId);
  }

  if (livepeerApiKey != null) {
    setLivePeerKey(livepeerApiKey);
  }

  final result = await join_(
    spaceId: spaceId,
    address: address,
    pgpPrivateKey: pgpPrivateKey,
    signer: signer,
    updatePlaybackUrl: _setPlaybackUrl,
    updateRoom: _updateLocalUserRoom,
    spaceData: data,
  );

  if (result != null) {
    data = result;
    notifyListeners();
  }

  return result;
}