public void onClick(View view) {
if (publishStream != null) {
mSwitchCameraButton.setEnabled(false);
publishStream.switchCamera(new CameraSwitchHandler() {
@Override
public void onCameraSwitchDone(boolean var1) {
runOnUiThread(new Runnable() {
@Override
public void run() {
mSwitchCameraButton.setEnabled(true);
}
});
}
@Override
public void onCameraSwitchError(String var1) {
runOnUiThread(new Runnable() {
@Override
public void run() {
mSwitchCameraButton.setEnabled(true);
}
});
}
});
}
}
Please check out Video Chat demo code.1) In video chat demo I want to get number of participants who join the room and at that time other user preview screen count increment
var participants = room.getParticipants();
for (var i = 0; i < participants.length; i++) {
participants[i].sendMessage(message);
}
The Video Chat sample is two way video chat.2) Publish and preview display proper in two devices but when i am trying to connect more than two devices then preview will display a black screen
You can start with simple Two Way Streaming demo.I am developing an android application in which one user can publish live video and multiple users can join and see that video like Instagram so can you please tell me which demo suits for this requirement?
Please add a few screenshots and show id detail how it works and how it should work in your vision.it will rotate right preview to left side