join method

Future<void> join()

Joins the VideoSDK Room.

  • After creating the instance of VideoSDK Room, you can join the room by calling this method.

Events associated with join():

Permission-based join behavior:

Participant with ask_join permission:

If a token contains the ask_join permission, the participant will not join the room directly. Instead, an Events.entryRequested event will be emitted to participants with the allow_join permission. After the decision is made, an Events.entryResponded event will be emitted containing the decision.

Participant with allow_join permission:

If a token contains the allow_join permission, the participant will join the room directly after calling join.

Example

// Create and join a room
Room room = VideoSDK.createRoom(
  roomId: "abcd-efgh-ijkl",
  token: "your-token",
);

// Listen to room joined event
room.on(Events.roomJoined, () {
  print('Successfully joined the room');
});

// Join the room
await room.join();

Implementation

Future<void> join() => _join();