client-sdk-flutter
client-sdk-flutter copied to clipboard
[bug] localParticipant can not setName setMetadata setAttributes
Describe the bug
localParticipant can not setName setMetadata setAttributes
print([_duration, permissions.canPublish, permissions.canPublishData, permissions.canSubscribe, permissions.canUpdateMetadata]); // canUpdateMetadata -> false
widget.room.localParticipant?.setName(UserStore.to.userModel.userName);
widget.room.localParticipant?.setMetadata(UserStore.to.userModel.toJson());
widget.room.localParticipant?.setAttributes(UserStore.to.userModel.toMap());
print(widget.room.localParticipant?.metadata);
print(widget.room.localParticipant?.attributes);
how to set canUpdateOwnMetadata = true
/**
* Sets and updates the metadata of the local participant.
* Note: this requires `canUpdateOwnMetadata` permission.
* method will throw if the user doesn't have the required permissions
* @param metadata
*/
async setMetadata(metadata: string): Promise<void> {
await this.requestMetadataUpdate({ metadata });
}
To Reproduce
Expected behavior
Platform information
- Flutter version:
- Plugin version:
- Flutter target OS:
- Flutter target OS version:
- Flutter console log: