|
在视频界面切换用户,用Spinner让用户自己选择与之视频的对象,在选中Spinner的Item切换用户时,代码如下:public void onItemSelected(AdapterView<?> arg0, View arg1,
int arg2, long arg3) {
AnychatUserEntity item = (AnychatUserEntity) arg0.getAdapter()
.getItem(arg2);
if (item != null) {
anychat.UserCameraControl(anychatId, 0);
anychat.UserSpeakControl(anychatId, 0);
int id = item.getAnychatId();
int index = anychat.mVideoHelper.bindVideo(otherView
.getHolder());
anychat.mVideoHelper.SetVideoUser(index, id);
anychat.UserCameraControl(id, 1);
anychat.UserSpeakControl(id, 1);
remoteTarUserId = id;
}
}
当我点击Spinner的选择项时,显示对方视频的SurfaceView,就停在之前切换用户的画面上,
|
|