GetStream/stream-video-flutter

Include custom data in call participant and call state

Aanu1995 opened this issue · 2 comments

  1. Stream Video provide option to include custom data when creating user. However, in call participant, the custom data is not included, so there is no way to access the data.
Screenshot 2023-12-21 at 03 23 46
  1. In Backend via API call, there is option to include to include custom data when creating call. However, this data could not be access in call state.
Screenshot 2023-12-21 at 03 32 58 Screenshot 2023-12-21 at 03 34 08
Brazol commented

Hi @Aanu1995, thanks for the feedback.

I can confirm that custom data were missing in CallParticipantState, and I already created a PR with the fix. It will be part of the next release.

As for the custom data in Call, it is accessible in CallDetails.
Here is an example of how to access it:

    final result = await call.getOrCreate();
    final metadata = result.fold(
      success: (success) => success.data.data.metadata.details.custom,
      failure: (failure) => throw Exception(failure.error),
    );

I'm closing the issue, but feel free to reopen it if you encounter any other issues regarding this.

Thank you.