setLiveID method

void setLiveID(
  1. String liveID
)

Implementation

void setLiveID(String liveID) {
  coHostState.currentRoomId = liveID;
  CoHostStore coHostStore = CoHostStore.create(coHostState.currentRoomId);
  coHostStore.coHostState.connected.addListener(_onConnectionUserListListener);

  coHostListener = CoHostListener(
    onCoHostRequestReceived: (SeatUserInfo inviter, String extensionInfo) {},
    onCoHostRequestCancelled: (SeatUserInfo inviter, SeatUserInfo? invitee) {},
    onCoHostRequestAccepted: (SeatUserInfo invitee) {
      onConnectionRequestAccept(invitee);
    },
    onCoHostRequestRejected: (SeatUserInfo invitee) {
      onConnectionRequestReject(invitee);
    },
    onCoHostRequestTimeout: (SeatUserInfo inviter, SeatUserInfo invitee) {
      onConnectionRequestTimeout(inviter, invitee);
    },
    onCoHostUserJoined: (SeatUserInfo userInfo) {},
    onCoHostUserLeft: (SeatUserInfo userInfo) {},
  );
  coHostStore.addCoHostListener(coHostListener!);
}