private final IRTCVideoEventHandler mIRTCVideoEventHandler = new IRTCVideoEventHandler() {
public void onLocalAudioPropertiesReport(LocalAudioPropertiesInfo[] audioPropertiesInfos) {
super.onLocalAudioPropertiesReport(audioPropertiesInfos);
public void onRemoteAudioPropertiesReport(RemoteAudioPropertiesInfo[] audioPropertiesInfos, int totalRemoteVolume) {
super.onRemoteAudioPropertiesReport(audioPropertiesInfos, totalRemoteVolume);
private final IRTCRoomEventHandler mIRTCRoomEventHandler = new IRTCRoomEventHandler() {
public void onRoomStateChanged(String roomId, String uid, int state, String extraInfo) {
super.onRoomStateChanged(roomId, uid, state, extraInfo);
public void onUserJoined(UserInfo userInfo, int elapsed) {
super.onUserJoined(userInfo, elapsed);
public void onUserPublishStream(String uid, MediaStreamType type) {
super.onUserPublishStream(uid, type);
if (type == MediaStreamType.RTC_MEDIA_STREAM_TYPE_AUDIO) {
TextureView view = new TextureView(Utilities.getApplicationContext());
VideoCanvas videoCanvas = new VideoCanvas(view, VideoCanvas.RENDER_MODE_HIDDEN);
RemoteStreamKey streamKey = new RemoteStreamKey(mRoomId,uid,StreamIndex.STREAM_INDEX_MAIN);
mRTCVideo.setRemoteVideoCanvas(streamKey, videoCanvas);