Commit 77afd093 authored by pangcong Git's avatar pangcong Git
Browse files

音视频点击事件监听判空

parent a95da64d
......@@ -122,14 +122,18 @@ public class JRTCCameraView<T extends JRTCCommonEngine<F>, F extends IJRTCCommon
isEnableFlip(false);
mTapViewModel.setTapViewState(JRTCGlobalDefine.TAP_VIEW_STATE_CLOSED);
JRTCToastManager.getInstance().showMessage(getContext(), getContext().getString(R.string.kit_camera_is_off));
onClickStateListener.onClickState(false);
if(onClickStateListener !=null){
onClickStateListener.onClickState(false);
}
} else if (state == JRTCGlobalDefine.TAP_VIEW_STATE_CLOSED) {
mEngine.startCamera();
mEngine.enableUploadVideoStream(true);
isEnableFlip(true);
mTapViewModel.setTapViewState(JRTCGlobalDefine.TAP_VIEW_STATE_OPEN);
JRTCToastManager.getInstance().showMessage(getContext(), getContext().getString(R.string.kit_camera_is_on));
onClickStateListener.onClickState(true);
if(onClickStateListener !=null){
onClickStateListener.onClickState(true);
}
}
tabViewState();
}
......
......@@ -119,12 +119,16 @@ public class JRTCMicView<T extends JRTCCommonEngine<F>, F extends IJRTCCommonEng
JRTCToastManager.getInstance().showMessage(getContext(),getContext().getString(R.string.kit_mic_is_off));
mEngine.enableUploadAudioStream(false);
mTapViewModel.setTapViewState(JRTCGlobalDefine.TAP_VIEW_STATE_CLOSED);
onClickStateListener.onClickState(false);
if(onClickStateListener !=null){
onClickStateListener.onClickState(false);
}
} else if (state == JRTCGlobalDefine.TAP_VIEW_STATE_CLOSED) {
mEngine.enableUploadAudioStream(true);
mTapViewModel.setTapViewState(JRTCGlobalDefine.TAP_VIEW_STATE_OPEN);
JRTCToastManager.getInstance().showMessage(getContext(), getContext().getString(R.string.kit_mic_is_on));
onClickStateListener.onClickState(true);
if(onClickStateListener !=null){
onClickStateListener.onClickState(true);
}
}
tabViewState();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment