updateProperties method
set/update room properties
@param isForce: Whether the operation is mandatory, that is, the property of the room whose owner is another user can be modified. @param isDeleteAfterOwnerLeft: Room attributes are automatically deleted after the owner leaves the room. @param isUpdateOwner: Whether to update the owner of the room attribute involved.
Implementation
Future<bool> updateProperties({
required String roomID,
required Map<String, String> roomProperties,
bool isForce = false,
bool isDeleteAfterOwnerLeft = false,
bool isUpdateOwner = false,
}) async {
if (null == ZegoUIKit().getPlugin(ZegoUIKitPluginType.signaling)) {
ZegoLoggerService.logInfo(
'signaling is null',
tag: 'live-streaming',
subTag: 'controller.room, updateProperties',
);
return false;
}
return ZegoUIKit()
.getSignalingPlugin()
.updateRoomProperties(
roomID: roomID,
roomProperties: roomProperties,
isForce: isForce,
isDeleteAfterOwnerLeft: isDeleteAfterOwnerLeft,
isUpdateOwner: isUpdateOwner,
)
.then((result) {
if (null != result.error) {
ZegoLoggerService.logInfo(
'error:$result',
tag: 'live-streaming',
subTag: 'controller.room, updateProperties',
);
return false;
}
return true;
});
}