Unable to get all room options in onRoomListUpdate

edited December 2017 in Native

I have a bunch of rooms created using opCreateRoom. I've been adding properties to the RoomOptions to specify Room parameters:

Hashtable props;
props.put(L"PublicIp", PublicIpJ);
props.put(L"PrivateIp", PrivateIpJ);

mpLbc->opCreateRoom(RandRoomNameJString, RoomOptions().setCustomRoomProperties(props));

Problem is, I can't get it back, when I use onRoomListUpdate:

const JVector& rooms = mpLbc->getRoomList();

for (unsigned int i = 0; i < rooms.getSize(); ++i)
JString DisplayString = rooms[i]->getCustomProperties().toString();

The DisplayString is completely empty. How can I get the PublicIp, and PrivateIp back?

I think onRoomListUpdate is returning the Room's properties, not the RoomOption's properties. How do I get the RoomOption of a room?


  • Hi @mantracker.

    On default the properties of a room are only visible from within that room.

    To make a room property visible in the lobby, you need to add it to the JVector that you pass to RoomOptions::setPropsListedInLobby().
    Hashtable props;
    props.put(L"PublicIp", PublicIpJ);
    props.put(L"PrivateIp", PrivateIpJ);
    JVector<JString> propsListedInLobby;
    mpLbc->opCreateRoom(RandRoomNameJString, RoomOptions().setCustomRoomProperties(props).setPropsListedInLobby(propsListedInLobby));
Sign In or Register to comment.