Set avatar for users
Live Audio Room Kit (ZegoUIKitPrebuiltLiveAudioRoom) supports you to customize the user avatar and share it with in-room participants. All you need to do is pass the image URL (PNG, JGP, JGEP, BMP, GIF, and WEBP are supported).
Note
The URL must be within 64 bytes. If exceeds, the default background is displayed.
Here is the reference code:
ZegoUIKitPrebuiltLiveAudioRoomConfig config;
if (isHost) {
config = ZegoUIKitPrebuiltLiveAudioRoomConfig.host();
} else {
config = ZegoUIKitPrebuiltLiveAudioRoomConfig.audience();
}
config.userAvatarUrl = YOUR IMAGE URL;
ZegoUIKitPrebuiltLiveAudioRoomFragment fragment = ZegoUIKitPrebuiltLiveAudioRoomFragment.newInstance(appID,appSign, userID, userName, roomID, config);
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, fragment).commitNow();